5 examples for php

{{ score }}
  # Start the builtin webserver on port 8000
# serving the specified directory "/foo"

php -S localhost:8000 -t /foo
        
{{ score }}
  # Execute PHP file via command-line with `php -f` 
php -f my_file.php
        
{{ score }}
  # Start the builtin webserver on port 8000
# serving the current directory
php -S localhost:8000
        
{{ score }}
  # Start the builtin webserver on port 8000
# serving the current directory
# using a specified .ini file for configuration
php -S localhost:8000 -c custom_php.ini
        
{{ score }}
  # Execute PHP code via command-line with `php -r ''`
php -r '
$myName = "bob";
echo "hello, " . $myName;
echo "\n";
'