3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Testing { private $value = 0; public function incrementBy1() { $this->value ++; if (rand(1, 9)) { return null; } return $this; } public function output() { echo "value: " . $this->value; } } $test = new Testing; $test->incrementBy1()->incrementBy1()->incrementBy1()->output();

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)
7.4.10.0090.00915.00
7.4.00.0100.00714.84
7.3.130.0040.01514.89
7.3.120.0110.01114.81
7.3.110.0100.01014.52
7.3.100.0140.00314.71
7.3.90.0000.01414.81
7.3.80.0000.01015.09
7.3.70.0040.00714.92
7.3.60.0000.01514.59
7.3.50.0000.00914.53
7.3.40.0070.00714.80
7.3.30.0090.00014.56
7.3.20.0100.00716.83
7.3.10.0060.01016.33
7.3.00.0120.00416.56
7.2.260.0040.01414.84
7.2.250.0120.00914.80
7.2.240.0000.01515.07
7.2.230.0060.00915.15
7.2.220.0030.00914.91
7.2.210.0040.01115.21
7.2.200.0070.00714.60
7.2.190.0060.01015.09
7.2.180.0060.00615.11
7.2.170.0000.01415.03
7.2.160.0070.00714.81
7.2.150.0100.00316.91
7.2.140.0030.01016.84
7.2.130.0060.01016.93
7.2.120.0050.00916.77
7.2.110.0110.00216.91
7.2.100.0100.00516.90
7.2.90.0600.00716.17
7.2.80.1270.00916.13
7.2.70.0070.01216.11
7.2.60.0110.00516.12
7.2.50.0100.00716.00
7.2.40.0130.00616.36
7.2.30.0300.00916.09
7.2.20.0040.01316.21
7.2.10.0510.00816.01
7.2.00.0130.00916.13
7.1.330.0030.00615.72
7.1.320.0060.01215.29
7.1.310.0000.01215.79
7.1.300.0000.01515.79
7.1.290.0080.00015.70
7.1.280.0060.00315.59
7.1.270.0070.00815.46
7.1.260.0030.01015.74
7.1.250.0070.00715.67
7.1.240.0050.00615.68
7.1.230.0100.00715.64
7.1.220.0100.00515.61
7.1.210.0670.00615.03
7.1.200.0730.00714.97
7.1.190.0750.00814.93
7.1.180.0100.00514.98
7.1.170.0220.00915.05
7.1.160.0170.00815.07
7.1.150.0450.00715.04
7.1.140.0670.00314.99
7.1.130.0090.00714.88
7.1.120.0090.01014.98
7.1.110.0250.00714.99
7.1.100.0090.00815.06
7.1.90.0060.00814.94
7.1.80.0060.00914.89
7.1.70.0050.01114.87
7.1.60.0170.00820.93
7.1.50.0650.00820.89
7.1.40.0390.00421.16
7.1.30.0150.00920.93
7.1.20.0370.00921.04
7.1.10.0110.00714.94
7.1.00.0110.00515.08
7.0.330.0070.00515.24
7.0.320.0040.00715.30
7.0.310.0030.01015.23
7.0.300.0030.01015.25
7.0.290.0080.00615.46
7.0.280.0000.01215.35
7.0.270.0080.00815.47
7.0.260.0100.00315.27
7.0.250.0040.01115.31
7.0.240.0060.00315.18
7.0.230.0030.00615.16
7.0.220.0030.00615.50
7.0.210.0030.00615.40
7.0.200.0060.00615.14
7.0.190.0000.01715.42
7.0.180.0000.01315.39
7.0.170.0000.01715.53
7.0.160.0090.00315.39
7.0.150.0030.01015.37
7.0.140.0040.00815.42
7.0.130.0130.00015.42
7.0.120.0090.00615.32
7.0.110.0040.00415.34
7.0.100.0040.00715.05
7.0.90.0100.00315.26
7.0.80.0030.01015.30
7.0.70.0040.00815.43
7.0.60.0070.00715.38
7.0.50.0030.01015.58
7.0.40.0080.00413.29
7.0.30.0040.01113.39
7.0.20.0070.00713.32
7.0.10.0000.01113.41
7.0.00.0110.00413.51
5.6.400.0060.00914.31
5.6.390.0040.00714.25
5.6.380.0000.01014.49
5.6.370.0100.00314.04
5.6.360.0070.00714.27
5.6.350.0030.01214.35
5.6.340.0040.01114.11
5.6.330.0090.00014.21
5.6.320.0030.01014.31
5.6.310.0060.00914.40
5.6.300.0000.01214.38
5.6.290.0060.00314.07
5.6.280.0070.01014.27
5.6.270.0030.01314.39
5.6.260.0110.00414.21
5.6.250.0040.01114.43
5.6.240.0040.01114.48
5.6.230.0030.00914.43
5.6.220.0080.00814.25
5.6.210.0070.00714.62
5.6.200.0000.01014.31
5.6.190.0040.01114.42
5.6.180.0000.01314.25
5.6.170.0060.00314.33
5.6.160.0000.01414.12
5.6.150.0150.00314.13
5.6.140.0090.00914.52
5.6.130.0000.00814.55
5.6.120.0030.00914.27
5.6.110.0030.01014.18
5.6.100.0060.00314.41
5.6.90.0060.00914.25
5.6.80.0110.00314.27
5.6.70.0060.01214.08
5.6.60.0090.00614.10
5.6.50.0030.01414.05
5.6.40.0000.01014.36
5.6.30.0050.00313.90
5.6.20.0100.00314.15
5.6.10.0060.00613.96
5.6.00.0040.00414.14

preferences:
44.32 ms | 400 KiB | 5 Q