3v4l.org

run code in 300+ PHP versions simultaneously
<?php $option_value = array(); $option_value['image'] = 'data/eprint_logo_new4.jpg'; $img = end(explode("/",$option_value['image'])); $img = explode(".",$img); $ext = end($img); $img = implode(".",array_slice($img,1,-1)); echo $img . ' + ' + $ext;
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Notice: Only variables should be passed by reference in /in/9vhqC on line 5 Fatal error: Uncaught TypeError: Unsupported operand types: string + string in /in/9vhqC:9 Stack trace: #0 {main} thrown in /in/9vhqC on line 9
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /in/9vhqC on line 9 Notice: Only variables should be passed by reference in /in/9vhqC on line 5 Warning: A non-numeric value encountered in /in/9vhqC on line 9 Warning: A non-numeric value encountered in /in/9vhqC on line 9 0
Output for 7.3.32 - 7.3.33
Warning: A non-numeric value encountered in /in/9vhqC on line 9 Warning: A non-numeric value encountered in /in/9vhqC on line 9 0
Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31
Notice: Only variables should be passed by reference in /in/9vhqC on line 5 Warning: A non-numeric value encountered in /in/9vhqC on line 9 Warning: A non-numeric value encountered in /in/9vhqC on line 9 0
Output for 7.0.0 - 7.0.20
Notice: Only variables should be passed by reference in /in/9vhqC on line 5 0
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Strict Standards: Only variables should be passed by reference in /in/9vhqC on line 5 0

preferences:
165.17 ms | 401 KiB | 179 Q