3v4l.org

run code in 300+ PHP versions simultaneously
<?php class G { public $prefixes = array(); public function test($prefix, $baseDir) { if (!isset($this->prefixes[$prefix])) { $this->prefixes[$prefix] = []; } array_push($this->$prefixes[$prefix], $baseDir); } } $l = new G(); $l->test("a", "b"); var_dump($l);

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.70.0150.00316.63
8.3.60.0000.01416.63
8.3.50.0060.01222.00
8.3.40.0120.00918.92
8.3.30.0070.00718.93
8.3.20.0050.00320.22
8.3.10.0080.00023.71
8.3.00.0080.00019.85
8.2.180.0100.00718.41
8.2.170.0110.00422.96
8.2.160.0070.00720.57
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0000.00819.14
8.2.120.0030.00626.35
8.2.110.0060.00320.52
8.2.100.0040.00718.16
8.2.90.0060.00319.38
8.2.80.0040.00417.97
8.2.70.0070.00317.63
8.2.60.0060.00318.05
8.2.50.0000.01018.07
8.2.40.0030.00622.20
8.2.30.0070.00020.68
8.2.20.0040.00417.71
8.2.10.0000.00818.23
8.2.00.0040.00418.11
8.1.280.0040.01125.92
8.1.270.0110.00420.38
8.1.260.0000.00828.09
8.1.250.0030.00528.09
8.1.240.0090.00023.79
8.1.230.0000.01117.78
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0090.00017.25
8.1.190.0090.00017.25
8.1.180.0070.00018.10
8.1.170.0040.00418.64
8.1.160.0040.00420.73
8.1.150.0000.00818.89
8.1.140.0000.00819.49
8.1.130.0030.00317.71
8.1.120.0040.00417.43
8.1.110.0000.00817.36
8.1.100.0040.00417.46
8.1.90.0000.00717.47
8.1.80.0040.00417.32
8.1.70.0000.00717.41
8.1.60.0040.00417.64
8.1.50.0030.00517.55
8.1.40.0040.00417.52
8.1.30.0050.00517.54
8.1.20.0060.00317.61
8.1.10.0040.00417.48
8.1.00.0000.00717.41
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0030.00318.32
8.0.270.0030.00317.17
8.0.260.0000.00817.13
8.0.250.0040.00417.04
8.0.240.0070.00017.04
8.0.230.0030.00516.92
8.0.220.0000.00816.88
8.0.210.0030.00316.92
8.0.200.0000.00817.06
8.0.190.0000.01017.04
8.0.180.0020.00516.87
8.0.170.0040.00416.99
8.0.160.0040.00416.86
8.0.150.0030.00316.93
8.0.140.0030.00416.79
8.0.130.0040.00413.32
8.0.120.0090.00016.81
8.0.110.0040.00416.99
8.0.100.0070.00016.84
8.0.90.0000.00717.02
8.0.80.0080.00616.85
8.0.70.0100.00017.01
8.0.60.0000.00716.93
8.0.50.0000.00716.86
8.0.30.0080.01017.19
8.0.20.0110.00817.40
8.0.10.0000.00717.03
8.0.00.0060.01116.83
7.4.330.0050.00016.75
7.4.320.0000.00616.41
7.4.300.0050.00516.57
7.4.290.0000.00716.65
7.4.280.0080.00016.60
7.4.270.0030.00316.43
7.4.260.0040.00416.38
7.4.250.0000.00716.45
7.4.240.0070.00016.48
7.4.230.0000.00716.58
7.4.220.0140.00316.62
7.4.210.0030.01616.63
7.4.200.0030.00316.60
7.4.160.0040.01116.71
7.4.150.0120.00617.40
7.4.140.0160.00617.86
7.4.130.0150.00316.46
7.4.120.0120.00916.49
7.4.110.0100.00616.60
7.4.100.0090.00916.59
7.4.90.0100.01316.52
7.4.80.0070.01419.39
7.4.70.0060.01516.59
7.4.60.0100.00716.56
7.4.50.0000.01316.41
7.4.40.0050.01416.65
7.4.30.0120.00916.69
7.4.00.0000.01614.94
7.3.330.0030.00313.31
7.3.320.0030.00313.36
7.3.310.0030.00316.40
7.3.300.0070.00016.34
7.3.290.0070.01116.33
7.3.280.0080.01016.30
7.3.270.0060.01017.40
7.3.260.0030.01416.48
7.3.250.0120.01216.47
7.3.240.0180.00116.41
7.3.230.0040.01416.39
7.3.210.0040.01316.44
7.3.200.0030.01316.47
7.3.190.0120.00916.62
7.3.180.0120.00616.64
7.3.170.0060.01316.52
7.3.160.0130.00316.49
7.2.330.0060.01216.82
7.2.320.0190.00916.79
7.2.310.0070.01116.63
7.2.300.0150.00316.61
7.2.290.0170.00316.92
7.2.60.0070.00716.61
7.2.00.0030.00919.46
7.1.200.0060.00615.75
7.1.100.0180.00717.88
7.1.70.0040.01117.20
7.1.60.0090.01619.52
7.1.50.0200.01034.95
7.1.00.0030.07722.45
7.0.200.0000.00716.83
7.0.60.0130.07019.90
7.0.50.0100.04317.69
7.0.40.0100.03720.23
7.0.30.0230.05720.16
7.0.20.0370.07720.16
7.0.10.0070.09020.24
7.0.00.0130.03320.09
5.6.280.0030.03021.08
5.6.210.0200.07320.71
5.6.200.0100.05018.17
5.6.190.0030.04320.60
5.6.180.0400.05320.61
5.6.170.0300.05720.50
5.6.160.0130.03720.39
5.6.150.0170.07018.16
5.6.140.0030.07318.12
5.6.130.0030.04018.28
5.6.120.0000.07020.90
5.6.110.0170.07021.13
5.6.100.0070.07021.01
5.6.90.0130.07721.07
5.6.80.0100.07720.41
5.5.350.0130.08020.41
5.5.340.0070.08018.00
5.5.330.0100.03720.41
5.5.320.0300.05720.27
5.5.310.0200.08020.33
5.5.300.0030.08717.98
5.5.290.0030.04717.96
5.5.280.0100.08020.90
5.5.270.0000.09020.89
5.5.260.0000.09320.76
5.5.250.0070.08320.70
5.5.240.0230.06020.27

preferences:
63.17 ms | 401 KiB | 5 Q