3v4l.org

run code in 300+ PHP versions simultaneously
<?php $int = 42; $float = 42.1234; $bool = true; $resource = fopen('php://stdout', 'w'); $null = null; $string = 'Foo bar'; $object = new \stdClass(); var_dump($int[1]); var_dump($float[1]); var_dump($bool[1]); var_dump($resource[1]); var_dump($null[1]); var_dump($string[1]); var_dump($object[1]);
Output for git.master, git.master_jit
Warning: Trying to access array offset on value of type int in /in/D3c2q on line 11 NULL Warning: Trying to access array offset on value of type float in /in/D3c2q on line 12 NULL Warning: Trying to access array offset on value of type bool in /in/D3c2q on line 13 NULL Warning: Trying to access array offset on value of type resource in /in/D3c2q on line 14 NULL Warning: Trying to access array offset on value of type null in /in/D3c2q on line 15 NULL string(1) "o" Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /in/D3c2q:17 Stack trace: #0 {main} thrown in /in/D3c2q on line 17
Process exited with code 255.
Output for rfc.property-hooks
Warning: Trying to access array offset on int in /in/D3c2q on line 11 NULL Warning: Trying to access array offset on float in /in/D3c2q on line 12 NULL Warning: Trying to access array offset on true in /in/D3c2q on line 13 NULL Warning: Trying to access array offset on resource in /in/D3c2q on line 14 NULL Warning: Trying to access array offset on null in /in/D3c2q on line 15 NULL string(1) "o" Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /in/D3c2q:17 Stack trace: #0 {main} thrown in /in/D3c2q on line 17
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
35.51 ms | 401 KiB | 8 Q