3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt=" gopu.phaneendra"; echo"hellp"; function add() { $x=20; $y=15; $z=$x+$y; echo $z; $z++; } function sub() { $x=20; $y=14; $z=$x-$y; echo $z; $z--; } function mul() { $x=20; $y=15; $z=20*15; echo $z; } function mod() { $x=200; $y=20; $z=$x%y; echo $x; Echo $y; echo $z; } function div() { $x=20; $y=2; $z=$x/$y; echo $z; } add(); add(); sub(); sub(); mul(); mod(); div();
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
hellp353566300 Fatal error: Uncaught Error: Undefined constant "y" in /in/erCM3:31 Stack trace: #0 /in/erCM3(48): mod() #1 {main} thrown in /in/erCM3 on line 31
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
hellp353566300 Warning: Use of undefined constant y - assumed 'y' (this will throw an Error in a future version of PHP) in /in/erCM3 on line 31 Warning: A non-numeric value encountered in /in/erCM3 on line 31 Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /in/erCM3:31 Stack trace: #0 /in/erCM3(48): mod() #1 {main} thrown in /in/erCM3 on line 31
Process exited with code 255.
Output for 7.1.0 - 7.1.33
hellp353566300 Notice: Use of undefined constant y - assumed 'y' in /in/erCM3 on line 31 Warning: A non-numeric value encountered in /in/erCM3 on line 31 Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /in/erCM3:31 Stack trace: #0 /in/erCM3(48): mod() #1 {main} thrown in /in/erCM3 on line 31
Process exited with code 255.
Output for 7.0.0 - 7.0.33
hellp353566300 Notice: Use of undefined constant y - assumed 'y' in /in/erCM3 on line 31 Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /in/erCM3:31 Stack trace: #0 /in/erCM3(48): mod() #1 {main} thrown in /in/erCM3 on line 31
Process exited with code 255.
Output for 4.4.5 - 4.4.9, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
hellp353566300 Notice: Use of undefined constant y - assumed 'y' in /in/erCM3 on line 31 Warning: Division by zero in /in/erCM3 on line 31 2002010
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.4, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
hellp353566300 Notice: Use of undefined constant y - assumed 'y' in /in/erCM3 on line 31 2002010

preferences:
291.79 ms | 402 KiB | 460 Q