3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { public function __construct(){ echo __CLASS__; } } $obj = new myClass; $flower = "violet"; $obj->color = function()use($flower){ $arr = ["rose"=>"red", "violet"=>"blue", "grass"=>"green"]; return $arr[$flower]; }; echo "...{$flower}s are ",($obj->color)();

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.0160.00318.43
8.3.50.0070.01121.05
8.3.40.0110.00418.79
8.3.30.0040.01218.89
8.3.20.0070.00020.35
8.3.10.0050.00321.82
8.3.00.0000.00721.90
8.2.180.0170.00316.75
8.2.170.0130.00322.96
8.2.160.0100.00320.35
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0040.00420.70
8.2.120.0070.00026.35
8.2.110.0060.00319.38
8.2.100.0080.00417.80
8.2.90.0040.00419.29
8.2.80.0000.00817.97
8.2.70.0000.00917.75
8.2.60.0040.00417.93
8.2.50.0060.00618.09
8.2.40.0040.00420.63
8.2.30.0070.00019.52
8.2.20.0040.00417.83
8.2.10.0030.00518.20
8.2.00.0000.00718.04
8.1.280.0120.00925.92
8.1.270.0120.00622.19
8.1.260.0000.00728.09
8.1.250.0050.00328.09
8.1.240.0060.00322.25
8.1.230.0070.00317.82
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0090.00017.23
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0000.00818.40
8.1.160.0040.00420.81
8.1.150.0000.00818.89
8.1.140.0000.00819.59
8.1.130.0070.00017.75
8.1.120.0000.00717.35
8.1.110.0070.00017.47
8.1.100.0040.00417.52
8.1.90.0000.00817.39
8.1.80.0000.00717.48
8.1.70.0030.00317.45
8.1.60.0080.00017.47
8.1.50.0060.00317.50
8.1.40.0040.00417.55
8.1.30.0040.00417.60
8.1.20.0070.00017.63
8.1.10.0040.00417.61
8.1.00.0000.00917.57
8.0.300.0080.00018.77
8.0.290.0030.00616.63
8.0.280.0000.00718.46
8.0.270.0000.00717.26
8.0.260.0030.00317.16
8.0.250.0030.00316.95
8.0.240.0000.00716.94
8.0.230.0070.00016.89
8.0.220.0000.00716.93
8.0.210.0070.00016.86
8.0.200.0000.00616.95
8.0.190.0000.00716.98
8.0.180.0060.00316.91
8.0.170.0030.00616.99
8.0.160.0000.00716.84
8.0.150.0030.00316.75
8.0.140.0070.00016.77
8.0.130.0060.00013.43
8.0.120.0030.00616.90
8.0.110.0000.00716.91
8.0.100.0000.00816.88
8.0.90.0070.00016.84
8.0.80.0120.00316.88
8.0.70.0020.00516.96
8.0.60.0000.00716.94
8.0.50.0050.00316.85
8.0.30.0080.00916.96
8.0.20.0120.01117.40
8.0.10.0070.00017.13
8.0.00.0080.01116.77
7.4.330.0050.00016.79
7.4.320.0060.00016.66
7.4.300.0040.00416.56
7.4.290.0000.00716.44
7.4.280.0000.00816.54
7.4.270.0070.00016.61
7.4.260.0030.00316.59
7.4.250.0030.00516.48
7.4.240.0070.00016.52
7.4.230.0000.00616.42
7.4.220.0130.00716.72
7.4.210.0080.00716.63
7.4.200.0000.00716.49
7.4.160.0090.00616.40
7.4.150.0090.00817.40
7.4.140.0060.01317.86
7.4.130.0120.00716.51
7.4.120.0090.00916.55
7.4.110.0130.00316.73
7.4.100.0100.00716.49
7.4.90.0070.01316.39
7.4.80.0000.01719.39
7.4.70.0130.00216.49
7.4.60.0100.00916.50
7.4.50.0120.00316.46
7.4.40.0140.00716.36
7.4.30.0030.01316.46
7.4.00.0080.00414.98
7.3.330.0030.00313.33
7.3.320.0030.00313.30
7.3.310.0030.00316.48
7.3.300.0030.00316.29
7.3.290.0000.00716.29
7.3.280.0150.00816.33
7.3.270.0080.00817.40
7.3.260.0070.01116.28
7.3.250.0100.00716.44
7.3.240.0130.00416.58
7.3.230.0030.01516.50
7.3.210.0070.01016.55
7.3.200.0120.00919.39
7.3.190.0100.01016.45
7.3.180.0070.01016.24
7.3.170.0090.00916.31
7.3.160.0140.00316.68
7.3.10.0110.00616.66
7.3.00.0090.01116.58
7.2.330.0030.01316.90
7.2.320.0070.01516.73
7.2.310.0070.01016.79
7.2.300.0090.00916.68
7.2.290.0090.01416.76
7.2.130.0130.00417.01
7.2.120.0050.01016.86
7.2.110.0140.00316.78
7.2.100.0070.00616.95
7.2.90.0060.00816.81
7.2.80.0000.01316.68
7.2.70.0020.00816.75
7.2.60.0080.00716.91
7.2.50.0030.01116.95
7.2.40.0060.00716.85
7.2.30.0070.00617.06
7.2.20.0050.00616.96
7.2.10.0040.00916.77
7.2.00.0020.01017.02
7.1.250.0110.00315.70
7.1.200.0030.01015.81
7.1.70.0000.00817.19
7.1.60.0130.01019.40
7.1.50.0100.00316.94
7.1.00.0100.07022.36
7.0.200.0480.01014.59
7.0.60.0170.03019.91
7.0.50.0100.03317.91
7.0.40.0070.07020.30
7.0.30.0400.07020.21
7.0.20.0500.03320.03
7.0.10.0070.04020.12
7.0.00.0100.08320.06
5.6.280.0030.05021.11
5.6.210.0070.03720.77
5.6.200.0070.09718.16
5.6.190.0130.08020.63
5.6.180.0370.06020.48
5.6.170.0370.08020.45
5.6.160.0030.05018.19
5.6.150.0030.04018.27
5.6.140.0030.08018.18
5.6.130.0100.05318.18
5.6.120.0100.03721.14
5.6.110.0230.07321.14
5.6.100.0200.07021.02
5.6.90.0030.04720.99
5.6.80.0000.08020.43
5.5.350.0170.07720.38
5.5.340.0030.03717.99
5.5.330.0070.06020.27
5.5.320.0570.07720.30
5.5.310.0370.07720.30
5.5.300.0000.05018.03
5.5.290.0100.07717.95
5.5.280.0070.09020.89
5.5.270.0130.07720.73
5.5.260.0030.06020.77
5.5.250.0070.08020.78
5.5.240.0600.03320.16

preferences:
58.82 ms | 401 KiB | 5 Q