3v4l.org

run code in 500+ PHP versions simultaneously
<?php error_reporting(E_ALL); ini_set('display_errors', 1); try { $res = array_shift(explode('.', 'Bundle-Ether12.100')); echo "OK RESULT: "; var_export($res); echo PHP_EOL; } catch (Throwable $e) { echo "THROWN: ", get_class($e), ": ", $e->getMessage(), PHP_EOL; }
Output for 8.2.0 - 8.2.36, 8.3.0 - 8.3.37, 8.4.1 - 8.4.28, 8.5.0 - 8.5.13, 8.6.0
Notice: Only variables should be passed by reference in /in/80kma on line 5 OK RESULT: 'Bundle-Ether12'

preferences:
29.84 ms | 1164 KiB | 6 Q