3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { } $obj = new myClass; $obj->color = function( $flower ){ $arr = ["rose"=>"red", "violet"=>"blue", "grass"=>"green"]; return $arr[$flower]; }; for ($flower = "rose";;){ if ($flower == "rose" || $flower == "blue" ){ echo "{$flower}s are ",($obj->color)($flower),"\n"; $flower = "blue"; } else { 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.3.60.0360.01216.50
8.3.50.0340.00622.11
8.3.40.0410.00018.74
8.3.30.0100.01018.89
8.3.20.0060.00320.21
8.3.10.0000.01023.66
8.3.00.0100.00021.95
8.2.180.0150.00316.75
8.2.170.0380.00822.96
8.2.160.0410.00822.26
8.2.150.0180.00924.18
8.2.140.0070.00424.66
8.2.130.0040.00720.65
8.2.120.0030.00626.35
8.2.110.0080.00319.31
8.2.100.0100.00317.93
8.2.90.0040.00419.35
8.2.80.0030.00617.97
8.2.70.0000.01317.75
8.2.60.0050.00517.93
8.2.50.0060.01118.09
8.2.40.0030.00622.35
8.2.30.0030.00619.55
8.2.20.0080.01217.81
8.2.10.0060.00318.18
8.2.00.0000.00818.10
8.1.280.0160.01025.92
8.1.270.0120.01222.05
8.1.260.0080.00428.09
8.1.250.0100.00028.09
8.1.240.0070.00422.21
8.1.230.0240.00417.70
8.1.220.0070.00717.77
8.1.210.0030.00618.77
8.1.200.0070.00417.11
8.1.190.0080.00017.13
8.1.180.0000.00818.10
8.1.170.0030.00618.59
8.1.160.0080.00020.82
8.1.150.0000.00820.73
8.1.140.0000.01119.69
8.1.130.0000.00817.76
8.1.120.0040.00417.55
8.1.110.0040.00417.45
8.1.100.0130.00617.43
8.1.90.0090.00017.52
8.1.80.0040.00417.43
8.1.70.0080.00017.41
8.1.60.0040.00717.70
8.1.50.0060.00317.49
8.1.40.0030.00617.57
8.1.30.0030.00617.56
8.1.20.0030.00617.61
8.1.10.0000.00917.63
8.1.00.0000.01817.46
8.0.300.0040.00418.77
8.0.290.0070.00416.63
8.0.280.0070.00018.25
8.0.270.0060.00317.18
8.0.260.0000.00717.10
8.0.250.0000.00816.94
8.0.240.0080.00016.96
8.0.230.0090.00516.77
8.0.220.0040.00716.90
8.0.210.0070.00016.89
8.0.200.0160.00316.94
8.0.190.0070.00316.76
8.0.180.0080.00016.88
8.0.170.0060.00316.91
8.0.160.0000.00716.94
8.0.150.0050.01416.85
8.0.140.0030.00616.74
8.0.130.0030.00313.43
8.0.120.0080.00016.88
8.0.110.0050.01016.78
8.0.100.0060.00316.78
8.0.90.0030.00616.75
8.0.80.0550.02116.80
8.0.70.0000.00816.77
8.0.60.0050.00616.79
8.0.50.0000.01016.70
8.0.30.0430.01717.01
8.0.20.0360.01717.40
8.0.10.0140.00016.93
8.0.00.0300.01616.66
7.4.330.0000.00716.84
7.4.320.0040.00416.47
7.4.300.0040.00416.32
7.4.290.0040.00416.36
7.4.280.0040.00416.46
7.4.270.0100.00516.43
7.4.260.0030.01016.50
7.4.250.0030.00616.38
7.4.240.0000.00816.34
7.4.230.0080.00016.56
7.4.220.0150.04216.41
7.4.210.0370.01416.34
7.4.200.0040.00416.50
7.4.160.0460.01716.36
7.4.150.0350.02017.40
7.4.140.0480.03017.86
7.4.130.0650.01216.49
7.4.120.0360.01916.52
7.4.110.0890.03016.57
7.4.100.0510.02216.54
7.4.90.0710.03416.31
7.4.80.0170.00619.39
7.4.70.0160.00916.45
7.4.60.0120.01216.54
7.4.50.0120.00916.29
7.4.40.0950.03116.57
7.4.30.0620.03516.64
7.4.00.0020.02314.91
7.3.330.0100.01013.29
7.3.320.0070.01113.18
7.3.310.0060.01316.36
7.3.300.0000.00816.20
7.3.290.0190.02216.31
7.3.280.0200.01816.26
7.3.270.0340.01917.40
7.3.260.0530.02216.43
7.3.250.0420.02216.38
7.3.240.0210.02416.46
7.3.230.0430.03316.39
7.3.210.0460.01816.28
7.3.200.0490.02416.21
7.3.190.0030.02416.30
7.3.180.0110.01416.28
7.3.170.0480.01816.40
7.3.160.0140.01716.48
7.2.330.0600.02116.82
7.2.320.0250.01816.52
7.2.310.0140.01116.74
7.2.300.0850.02816.61
7.2.290.0370.02516.74
7.2.60.0110.00716.69
7.1.200.0040.00715.80
7.1.70.0000.01017.10
7.1.60.0130.01719.40
7.1.50.0110.01417.04
7.1.00.0070.07722.35
7.0.200.0100.00016.79
7.0.120.0070.06022.18
7.0.110.0070.07721.92
7.0.100.0070.06321.95
7.0.90.0030.07722.10
7.0.80.0100.07021.97
7.0.70.0000.07722.05
7.0.60.0030.08022.06
7.0.50.0030.05022.06
7.0.40.0100.07022.07
7.0.30.0070.06322.08
7.0.20.0200.06022.20
7.0.10.0030.07022.00
7.0.00.0030.07722.16
5.6.260.0000.07320.97
5.6.250.0100.06320.96
5.6.240.0070.07321.09
5.6.230.0030.06721.03
5.6.220.0100.06020.81
5.6.210.0030.07320.94
5.6.200.0000.08020.80
5.6.190.0070.07020.99
5.6.180.0070.06321.09
5.6.170.0070.06721.03
5.6.160.0100.06321.08
5.6.150.0070.07320.92
5.6.140.0070.07321.08
5.6.130.0100.05720.82
5.6.120.0070.07021.03
5.6.110.0030.07720.93
5.6.100.0030.07720.73
5.6.90.0070.06021.06
5.6.80.0000.06320.32
5.6.70.0030.05720.20
5.6.60.0100.06720.17
5.6.50.0070.06720.27
5.6.40.0030.07020.37
5.6.30.0030.07020.37
5.6.20.0070.06720.30
5.6.10.0070.06720.27
5.6.00.0000.07020.44
5.5.380.0000.07317.56
5.5.370.0030.07017.68
5.5.360.0000.07717.68
5.5.350.0030.07017.62
5.5.340.0000.07318.09
5.5.330.0030.07318.22
5.5.320.0000.06718.13
5.5.310.0030.07018.22
5.5.300.0030.06718.11
5.5.290.0030.07718.05
5.5.280.0000.07718.13
5.5.270.0030.06318.09
5.5.260.0030.07018.12
5.5.250.0070.06717.91
5.5.240.0000.06317.62
5.5.230.0030.05717.50
5.5.220.0030.06017.30
5.5.210.0070.06717.63
5.5.200.0070.06317.61
5.5.190.0030.07017.48
5.5.180.0000.07317.31
5.5.160.0000.07017.48
5.5.150.0000.07017.45
5.5.140.0030.06317.43
5.5.130.0000.06017.60
5.5.120.0030.06317.40
5.5.110.0100.05017.31
5.5.100.0000.07317.35
5.5.90.0030.06317.36
5.5.80.0030.06317.15
5.5.70.0000.07317.14
5.5.60.0070.06317.33
5.5.50.0030.06317.49
5.5.40.0000.07017.16
5.5.30.0030.05717.33
5.5.20.0070.06717.07
5.5.10.0070.06317.36
5.5.00.0030.06717.32

preferences:
85.5 ms | 401 KiB | 5 Q