3v4l.org

run code in 300+ PHP versions simultaneously
<?php class bar { public function setup_pins() { for ($i = 0; $i < 4; $i++) { echo "Setting up pin " . $i . "\n"; $this->pin[$i] = new Pin; $this->pin[$i]->setup_unit(4, array()); } } } class Pin { public function setup_unit($pin_no, $units) { $this->do_counter(); echo $this->c; } public function do_counter() { if (! isset($this->c)) { $this->c = 0; echo "Not set\n"; } else { $this->c++; echo "C is " . $this->c . "\n"; } } } $stuff = new bar; $stuff->setup_pins();

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.0140.00718.43
8.3.50.0040.01116.24
8.3.40.0110.01118.77
8.3.30.0080.00818.74
8.3.20.0000.00818.74
8.3.10.0030.00523.48
8.3.00.0070.00019.83
8.2.180.0110.00416.38
8.2.170.0140.00319.04
8.2.160.0090.00922.96
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0080.00019.95
8.2.110.0030.00620.99
8.2.100.0080.00319.21
8.2.90.0080.00019.47
8.2.80.0040.00420.50
8.2.70.0090.00017.93
8.2.60.0030.00518.34
8.2.50.0050.00318.10
8.2.40.0030.00519.24
8.2.30.0070.00019.37
8.2.20.0050.00318.05
8.2.10.0040.00419.36
8.2.00.0040.00417.54
8.1.280.0060.01225.92
8.1.270.0050.00523.99
8.1.260.0030.00526.35
8.1.250.0070.00028.09
8.1.240.0060.00322.11
8.1.230.0110.00020.79
8.1.220.0040.00417.79
8.1.210.0050.00319.03
8.1.200.0030.00617.25
8.1.190.0000.00817.36
8.1.180.0060.00318.10
8.1.170.0080.00018.72
8.1.160.0040.00418.80
8.1.150.0070.00018.88
8.1.140.0040.00423.93
8.1.130.0070.00020.02
8.1.120.0000.00717.56
8.1.110.0000.00717.48
8.1.100.0030.00517.46
8.1.90.0050.00317.36
8.1.80.0040.00417.45
8.1.70.0040.00417.49
8.1.60.0000.00817.61
8.1.50.0080.00017.46
8.1.40.0000.00817.46
8.1.30.0030.00617.65
8.1.20.0000.00717.59
8.1.10.0040.00417.58
8.1.00.0040.00417.53
8.0.300.0050.00220.22
8.0.290.0000.00716.75
8.0.280.0070.00018.39
8.0.270.0000.00717.25
8.0.260.0070.00020.20
8.0.250.0050.00216.98
8.0.240.0040.00417.05
8.0.230.0040.00416.85
8.0.220.0000.00716.80
8.0.210.0030.00316.93
8.0.200.0040.00417.00
8.0.190.0060.00316.96
8.0.180.0080.00016.75
8.0.170.0090.00016.79
8.0.160.0000.00916.93
8.0.150.0070.00016.89
8.0.140.0000.00816.68
8.0.130.0030.00513.28
8.0.120.0050.00216.75
8.0.110.0000.00716.79
8.0.100.0040.00416.74
8.0.90.0040.00416.96
8.0.80.0090.00616.89
8.0.70.0050.00316.78
8.0.60.0000.00716.79
8.0.50.0070.00016.90
8.0.30.0110.00617.21
8.0.20.0140.01017.40
8.0.10.0030.00516.88
8.0.00.0140.00516.78
7.4.330.0050.00015.55
7.4.320.0040.00716.62
7.4.300.0030.00316.61
7.4.290.0030.00316.60
7.4.280.0030.00616.59
7.4.270.0070.00016.43
7.4.260.0000.00716.49
7.4.250.0040.00416.62
7.4.240.0000.00716.52
7.4.230.0030.00516.55
7.4.220.0000.00816.64
7.4.210.0050.00916.51
7.4.200.0000.00716.41
7.4.160.0100.00816.59
7.4.140.0120.00717.86
7.4.130.0090.00916.56
7.4.120.0090.01316.46
7.4.110.0140.00316.63
7.4.100.0100.00716.48
7.4.90.0140.00316.41
7.4.80.0030.01419.39
7.4.70.0060.01416.53
7.4.60.0100.00616.53
7.4.50.0040.01116.58
7.4.40.0080.00816.37
7.4.00.0060.00915.05
7.3.330.0030.00313.38
7.3.320.0030.00313.21
7.3.310.0030.00416.25
7.3.300.0070.00016.34
7.3.290.0020.00416.25
7.3.280.0090.00816.34
7.3.260.0080.01216.53
7.3.240.0110.00816.60
7.3.230.0070.01516.51
7.3.210.0140.00416.33
7.3.200.0130.00316.54
7.3.190.0060.01016.39
7.3.180.0090.01216.47
7.3.170.0120.01116.57
7.3.160.0120.00616.52
7.2.330.0090.00916.49
7.2.320.0120.00416.78
7.2.310.0130.00416.59
7.2.300.0040.01216.80
7.2.290.0070.01016.75
7.2.110.1580.00314.94
7.2.100.1450.00614.83
7.2.90.1480.01214.50
7.2.80.1460.01014.66
7.2.70.1380.00615.07
7.2.60.1510.00614.97
7.2.50.1930.01015.18
7.2.40.1690.00614.95
7.2.30.1850.00915.13
7.2.20.1580.00614.82
7.2.10.1780.01015.08
7.2.00.1680.00714.91
7.1.230.1570.00714.12
7.1.220.1450.01313.84
7.1.210.1610.00013.91
7.1.200.1680.00314.01
7.1.190.1700.00614.01
7.1.180.1520.01013.91
7.1.170.1420.01013.60
7.1.160.1640.00914.01
7.1.150.1440.01013.80
7.1.140.1860.01313.42
7.1.130.1650.00714.06
7.1.120.1390.00913.62
7.1.110.1540.00713.69
7.1.100.1350.00713.39
7.1.90.0560.00313.93
7.1.80.0440.00813.62
7.1.70.0410.01013.99
7.1.60.1530.01432.01
7.1.50.1670.01031.80
7.1.40.1940.00731.81
7.1.30.1660.00731.48
7.1.20.1970.00731.59
7.1.10.1350.00713.60
7.1.00.1500.00013.68
5.6.380.0080.01014.38

preferences:
56.04 ms | 400 KiB | 5 Q