3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $m=($i='123 min')%60;echo$h=$i/60|0," hour",s[$h<2]," $m minute",s[$m<2];
based on BvE8b
Output for 7.2.0
Notice: A non well formed numeric value encountered in /in/EP5Lr on line 3 Notice: A non well formed numeric value encountered in /in/EP5Lr on line 3 2 hour Warning: Use of undefined constant s - assumed 's' (this will throw an Error in a future version of PHP) in /in/EP5Lr on line 3 Notice: String offset cast occurred in /in/EP5Lr on line 3 s 3 minute Warning: Use of undefined constant s - assumed 's' (this will throw an Error in a future version of PHP) in /in/EP5Lr on line 3 Notice: String offset cast occurred in /in/EP5Lr on line 3 s
Output for 7.1.0 - 7.1.10
Notice: A non well formed numeric value encountered in /in/EP5Lr on line 3 Notice: A non well formed numeric value encountered in /in/EP5Lr on line 3 2 hour Notice: Use of undefined constant s - assumed 's' in /in/EP5Lr on line 3 Notice: String offset cast occurred in /in/EP5Lr on line 3 s 3 minute Notice: Use of undefined constant s - assumed 's' in /in/EP5Lr on line 3 Notice: String offset cast occurred in /in/EP5Lr on line 3 s
Output for 5.6.8 - 7.0.20
2 hour Notice: Use of undefined constant s - assumed 's' in /in/EP5Lr on line 3 Notice: String offset cast occurred in /in/EP5Lr on line 3 s 3 minute Notice: Use of undefined constant s - assumed 's' in /in/EP5Lr on line 3 Notice: String offset cast occurred in /in/EP5Lr on line 3 s
Output for 5.3.20 - 5.5.35
Parse error: syntax error, unexpected '[', expecting ',' or ';' in /in/EP5Lr on line 3
Process exited with code 255.