3v4l.org

run code in 500+ PHP versions simultaneously
<?php const FOO = 30; $foo = 5; $nested = 'nested'; switch ($foo) { case 10; case 20; echo $foo; break; case 'foo'; switch ($nested) { case 'nested' /*comment*/ ; break; default; break; } break; case FOO; { echo $foo; break; } default; echo 'default'; break; }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.70.0090.00516.89
8.5.60.0120.00816.72
8.5.50.0100.00616.71
8.5.30.0090.00818.03
8.5.20.0100.00720.26
8.5.10.0140.00516.96
8.5.00.0100.01222.61
8.4.220.0110.00919.54
8.4.210.0090.01221.29
8.4.180.0100.01222.04
8.4.170.0110.01123.82
8.4.160.0100.01323.98
8.4.150.0050.00416.86
8.4.140.0150.01217.45
8.4.130.0420.00717.21
8.4.120.0410.01217.18
8.4.110.0400.01117.47
8.4.100.0430.00817.34
8.4.90.0420.01017.52
8.4.80.0390.00317.80
8.4.70.0180.00417.77
8.4.60.0410.00717.48
8.4.50.0430.00917.42
8.4.40.0380.00917.30
8.4.30.0430.00417.64
8.4.20.0220.00217.78
8.4.10.0320.00617.52
8.3.310.0080.01318.32
8.3.300.0090.01118.99
8.3.290.0120.01120.68
8.3.280.0120.00818.37
8.3.270.0140.01016.68
8.3.260.0190.00316.60
8.3.250.0260.00916.62
8.3.240.0300.00716.35
8.3.230.0310.00816.33
8.3.220.0390.01116.61
8.3.210.0420.00716.43
8.3.200.0390.00816.29
8.3.190.0410.00716.34
8.3.180.0410.00416.79
8.3.170.0400.01216.41
8.3.160.0420.01116.26
8.3.150.0430.01016.20
8.3.140.0480.00716.59
8.3.130.0250.00516.41
8.3.120.0140.00616.25
8.3.110.0200.00315.82
8.3.100.0350.00715.86
8.3.90.0170.00616.47
8.3.80.0350.00516.31
8.3.70.0400.01116.18
8.3.60.0380.01216.10
8.3.50.0380.01216.11
8.3.40.0460.00817.16
8.3.30.0400.00617.39
8.3.20.0330.00817.31
8.3.10.0290.01217.25
8.3.00.0340.00817.19
8.2.310.0110.00917.98
8.2.300.0140.00520.33
8.2.290.0360.00816.23
8.2.280.0330.00716.14
8.2.270.0420.01016.17
8.2.260.0430.00616.25
8.2.250.0320.00816.38
8.2.240.0350.00816.26
8.2.230.0340.00816.35
8.2.220.0380.00616.64
8.2.210.0300.00516.33
8.2.200.0150.00516.08
8.2.190.0290.00416.27
8.2.180.0140.00716.30
8.2.170.0180.00217.82
8.2.160.0160.00617.75
8.2.150.0170.00417.66
8.2.140.0460.00717.21
8.2.130.0340.00917.39
8.2.120.0350.00617.53
8.2.110.0180.00617.55
8.2.100.0190.00417.34
8.2.90.0370.01017.77
8.2.80.0310.01117.37
8.2.70.0390.00317.55
8.2.60.0230.00617.55
8.2.50.0390.00917.57
8.2.40.0280.01317.41
8.2.30.0340.00417.30
8.2.20.0190.00617.44
8.2.10.0180.00217.61
8.2.00.0200.00717.50
8.1.340.0090.00917.54

preferences:
51.32 ms | 867 KiB | 5 Q