3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { } $obj = new myClass; $obj->color = function( $item ){ $arr = ["rose"=>"red", "violet"=>"blue", "grass"=>"green"]; return $arr[$item]; }; $flowers = [0=>"rose",1=>"violet"]; foreach ($flowers as $key => $flower){ echo ucfirst("{$flower}s are "); echo ($obj->color)($flower); echo ($key == 0)? ",\n" : " ...\n"; }

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.3.60.0120.00316.75
8.3.50.0000.01418.18
8.3.40.0070.00718.79
8.3.30.0070.00718.84
8.3.20.0040.00420.25
8.3.10.0040.00421.66
8.3.00.0030.01021.69
8.2.180.0130.00316.63
8.2.170.0100.01022.96
8.2.160.0110.00319.46
8.2.150.0100.00624.18
8.2.140.0080.00024.66
8.2.130.0060.00320.66
8.2.120.0000.00726.35
8.2.110.0050.00519.33
8.2.100.0000.01318.05
8.2.90.0080.00019.17
8.2.80.0000.00817.97
8.2.70.0000.00817.75
8.2.60.0080.00017.90
8.2.50.0050.00318.09
8.2.40.0060.00322.12
8.2.30.0070.00019.38
8.2.20.0000.00717.86
8.2.10.0050.00218.05
8.2.00.0000.00718.07
8.1.280.0060.00925.92
8.1.270.0180.00322.19
8.1.260.0030.00728.09
8.1.250.0050.00228.09
8.1.240.0090.00022.34
8.1.230.0060.00617.89
8.1.220.0000.00817.80
8.1.210.0000.00918.77
8.1.200.0080.00317.35
8.1.190.0050.00317.35
8.1.180.0030.00618.10
8.1.170.0000.00818.71
8.1.160.0040.00420.75
8.1.150.0040.00418.95
8.1.140.0000.00819.50
8.1.130.0070.00017.75
8.1.120.0000.00717.46
8.1.110.0000.00817.47
8.1.100.0070.00017.46
8.1.90.0000.00717.46
8.1.80.0040.00417.49
8.1.70.0040.00417.46
8.1.60.0080.00017.61
8.1.50.0090.00017.53
8.1.40.0030.00517.52
8.1.30.0050.00317.65
8.1.20.0030.00517.60
8.1.10.0030.00517.54
8.1.00.0090.00017.55
8.0.300.0030.00618.77
8.0.290.0040.00816.58
8.0.280.0030.00318.42
8.0.270.0070.00017.25
8.0.260.0000.00617.26
8.0.250.0030.00316.87
8.0.240.0000.00716.97
8.0.230.0000.00816.96
8.0.220.0000.00816.92
8.0.210.0030.00316.78
8.0.200.0060.00317.00
8.0.190.0040.00416.90
8.0.180.0040.00416.90
8.0.170.0000.00716.91
8.0.160.0040.00416.94
8.0.150.0070.00016.80
8.0.140.0070.00016.85
8.0.130.0030.00313.32
8.0.120.0040.00416.83
8.0.110.0000.00716.90
8.0.100.0030.00516.94
8.0.90.0040.00416.73
8.0.80.0130.01016.90
8.0.70.0040.00416.79
8.0.60.0050.00316.70
8.0.50.0000.00816.74
8.0.30.0110.00617.14
8.0.20.0110.01217.40
8.0.10.0040.00416.84
8.0.00.0080.00916.79
7.4.330.0000.00516.81
7.4.320.0030.00516.57
7.4.300.0030.00316.39
7.4.290.0000.00716.51
7.4.280.0050.00316.48
7.4.270.0000.00716.51
7.4.260.0050.00816.64
7.4.250.0000.00716.40
7.4.240.0070.00016.59
7.4.230.0000.00716.60
7.4.220.0030.01416.62
7.4.210.0070.01016.52
7.4.200.0070.00016.24
7.4.160.0090.00616.57
7.4.150.0130.00417.40
7.4.140.0170.00717.86
7.4.130.0110.00816.45
7.4.120.0090.00816.51
7.4.110.0070.01016.63
7.4.100.0120.00616.57
7.4.90.0060.01216.58
7.4.80.0150.00619.39
7.4.70.0140.00716.41
7.4.60.0070.01416.55
7.4.50.0060.01016.39
7.4.40.0090.01216.57
7.4.30.0070.01016.64
7.4.00.0100.00715.06
7.3.330.0050.00013.36
7.3.320.0000.00513.16
7.3.310.0070.00016.14
7.3.300.0070.00016.30
7.3.290.0040.00416.11
7.3.280.0070.01016.31
7.3.270.0130.00317.40
7.3.260.0160.00616.61
7.3.250.0080.01016.64
7.3.240.0080.01016.48
7.3.230.0060.01216.68
7.3.210.0100.00716.43
7.3.200.0090.00919.39
7.3.190.0160.00416.35
7.3.180.0030.01316.19
7.3.170.0060.00916.33
7.3.160.0080.01116.54
7.2.330.0150.00516.54
7.2.320.0120.00616.56
7.2.310.0100.00616.67
7.2.300.0040.01216.82
7.2.290.0170.00016.80
7.2.110.0300.00616.63
7.2.60.0000.01016.71
7.2.00.0030.00919.33
7.1.200.0060.00915.78
7.1.100.0030.01018.42
7.1.70.0050.00317.37
7.1.60.0150.00819.40
7.1.50.0030.01216.91
7.1.00.0100.07022.37
7.0.200.0970.00014.61
7.0.60.0270.06321.77
7.0.50.0030.08317.88
7.0.40.0030.05020.18
7.0.30.0230.03720.06
7.0.20.0270.05720.10
7.0.10.0030.07720.06
7.0.00.0000.04720.12
5.6.280.0000.04021.07
5.6.210.0100.04020.71
5.6.200.0030.08018.20
5.6.190.0100.04020.48
5.6.180.0300.03720.52
5.6.170.0070.07720.48
5.6.160.0100.04320.57
5.6.150.0070.08018.12
5.6.140.0070.05318.14
5.6.130.0070.04718.20
5.6.120.0200.07721.10
5.6.110.0070.08721.02
5.6.100.0130.05321.00
5.6.90.0200.06721.00
5.6.80.0070.07720.51
5.5.350.0200.05320.43
5.5.340.0230.06717.92
5.5.330.0100.08020.28
5.5.320.0470.04320.31
5.5.310.0170.03720.35
5.5.300.0130.07017.97
5.5.290.0100.04717.95
5.5.280.0070.07720.97
5.5.270.0170.07720.85
5.5.260.0100.07720.89
5.5.250.0030.07320.69
5.5.240.0230.07320.35

preferences:
69.02 ms | 400 KiB | 5 Q