php.ini:
xdebug.remote_enable=on
xdebug.remote_autostart=on
xdebug.remote_port=9000
xdebug.remote_host=host.docker.internal
xdebug.remote_connect_back=0| <?php | |
| use ProxyManager\Factory\LazyLoadingValueHolderFactory; | |
| use ProxyManager\Proxy\ProxyInterface; | |
| require_once __DIR__ . '/vendor/autoload.php'; | |
| $mysql = mysqli_connect('localhost', 'root', '', 'example'); | |
| $factory = new LazyLoadingValueHolderFactory(); |
| <?php | |
| // See https://wiki.php.net/rfc/named_params | |
| return new TwigConfig( | |
| paths => [ | |
| '%kernel.project_dir%/vendor/acme/foo-bar/templates' => 'foo_bar', | |
| ], | |
| autoescape => true, | |
| strictVariables => false, |
php.ini:
xdebug.remote_enable=on
xdebug.remote_autostart=on
xdebug.remote_port=9000
xdebug.remote_host=host.docker.internal
xdebug.remote_connect_back=0| # Docker-Compose shortcut: | |
| # - before: docker-compose exec app <command> | |
| # - after: d <command> | |
| # The alias will auto-start the service if it is stopped. | |
| # Requirements: | |
| # - jq: https://stedolan.github.io/jq/ | |
| # - yq: https://github.com/kislyuk/yq | |
| # Add this to your `~/.zshrc` at the end because `d` is an existing (unrelated) alias we want to override |
Usage:
php script.php test.plt
Sample output:
G01 X-7626 Y-392 Z0
| #!/bin/bash | |
| set -e | |
| cd /tmp | |
| echo "Installing PHP" | |
| #mkdir /tmp/php | |
| #curl -sSL https://s3-eu-west-1.amazonaws.com/mnapoli/test-aws/php.tar.gz | tar -xz -C /tmp/php |
| can be used with | foreach(… |
array_*(…) functions |
yield from … |
array type-hint |
Traversable type-hint |
can be implemented |
|---|---|---|---|---|---|---|
| array | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Traversable | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ |
| iterable | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ |
| <?php | |
| namespace PHPSTORM_META { | |
| $STATIC_METHOD_TYPES = [ | |
| \PHPUnit_Framework_TestCase::createMock('') => [ | |
| "" == "@|PHPUnit_Framework_MockObject_MockObject", | |
| ], | |
| \PHPUnit_Framework_TestCase::getMock('') => [ | |
| "" == "@|PHPUnit_Framework_MockObject_MockObject", | |
| ], |
| <?php | |
| namespace TwigModule; | |
| use Interop\Container\ContainerInterface; | |
| use Interop\Container\ServiceProvider\ServiceProvider; | |
| use Puli\Repository\Api\ResourceRepository; | |
| use Puli\TwigExtension\PuliExtension; | |
| use Puli\TwigExtension\PuliTemplateLoader; | |
| use Puli\UrlGenerator\Api\UrlGenerator; |