3v4l.org

run code in 300+ PHP versions simultaneously
<?php $line = "and 0.26818 0.14346 -0.27877 0.016257 0.11384 0.69923 -0.51332 -0.47368 -0.33075 -0.13834 0.2702 0.30938 -0.45012 -0.4127 -0.09932 0.038085 0.029749 0.10076 -0.25058 -0.51818 0.34558 0.44922 0.48791 -0.080866 -0.10121 -1.3777 -0.10866 -0.23201 0.012839 -0.46508 3.8463 0.31362 0.13643 -0.52244 0.3302 0.33707 -0.35601 0.32431 0.12041 0.3512 -0.069043 0.36885 0.25168 -0.24517 0.25381 0.1367 -0.31178 -0.6321 -0.25028 -0.38097"; $word = explode(" ",$line)[0]; echo $word."<br/>"; $vector = implode( array_shift( explode(' ',$line) ) );
Output for 8.1.24 - 8.1.27, 8.2.11 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
and<br/> Notice: Only variables should be passed by reference in /in/7ZL0Y on line 5 Fatal error: Uncaught TypeError: implode(): Argument #1 ($array) must be of type array, string given in /in/7ZL0Y:5 Stack trace: #0 /in/7ZL0Y(5): implode('and') #1 {main} thrown in /in/7ZL0Y on line 5
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 and<br/> Notice: Only variables should be passed by reference in /in/7ZL0Y on line 5 Fatal error: Uncaught TypeError: implode(): Argument #1 ($array) must be of type array, string given in /in/7ZL0Y:5 Stack trace: #0 /in/7ZL0Y(5): implode('and') #1 {main} thrown in /in/7ZL0Y on line 5
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.23, 8.2.0 - 8.2.10
and<br/> Notice: Only variables should be passed by reference in /in/7ZL0Y on line 5 Fatal error: Uncaught TypeError: implode(): Argument #1 ($pieces) must be of type array, string given in /in/7ZL0Y:5 Stack trace: #0 /in/7ZL0Y(5): implode('and') #1 {main} thrown in /in/7ZL0Y on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33
and<br/> Notice: Only variables should be passed by reference in /in/7ZL0Y on line 5 Warning: implode(): Argument must be an array in /in/7ZL0Y on line 5
Output for 7.3.32 - 7.3.33
and<br/> Warning: implode(): Argument must be an array in /in/7ZL0Y on line 5
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28
and<br/> Strict Standards: Only variables should be passed by reference in /in/7ZL0Y on line 5 Warning: implode(): Argument must be an array in /in/7ZL0Y on line 5
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/7ZL0Y on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/7ZL0Y on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/7ZL0Y on line 3
Process exited with code 255.

preferences:
228.13 ms | 401 KiB | 311 Q