Code Monkey home page Code Monkey logo

Comments (4)

UmanShahzad avatar UmanShahzad commented on August 17, 2024 1

@SobanMahmood can you look into writing PHP script equivalents of the interactive shell we've got going on in the README.md?

from php.

UmanShahzad avatar UmanShahzad commented on August 17, 2024

Yeah I think the README.md has faulty instructions because the PHP shell won't allow this kind of importing the way you've done it. I guess the README.md is more for 'display' and less for actually executing it. But we should find an alternative method, like maybe a quick PHP script that does the same thing.

from php.

peter279k avatar peter279k commented on August 17, 2024

I also found that it uses the psysh to complete the Quick Start section, not using the php -a command.

If using the php -a command, it should let all commands run in the single line with semicolon to be separated rather than separated commands.

Some examples are as follows:

peterli@peterli-Virtual-Machine:~$ php -v
PHP 8.1.4 (cli) (built: Apr  4 2022 13:30:17) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.4, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.4, Copyright (c), by Zend Technologies
peterli@peterli-Virtual-Machine:~$ php -a
Interactive shell

php > require_once __DIR__ . '/vendor/autoload.php';
php > use ipinfo\ipinfo\IPinfo;
php > $client = new IPinfo('123456789abc');
PHP Warning:  Uncaught Error: Class "IPinfo" not found in php shell code:1
Stack trace:
#0 {main}
  thrown in php shell code on line 1
php > require_once __DIR__ . '/vendor/autoload.php';use ipinfo\ipinfo\IPinfo;$client = new IPinfo('123456789abc');
php >

from php.

UmanShahzad avatar UmanShahzad commented on August 17, 2024

Hmm I see, but just for displaying it to be honest we can just give basic PHP code snippets, instead of some custom shell or whatever which most people won't use or download.

from php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.