3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $baz = 1; private $cat = 'abc'; public static function foo() { // echo "foo\n"; return self::cat; } public function bar() { echo "bar\n"; $this->foo(); $this::foo(); self::foo(); self::baz(); } public function baz() { printf("baz = %d\n", $this->baz); } } $test = new Test; $test->bar();

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.0070.00716.63
8.3.50.0130.01121.99
8.3.40.0030.01718.79
8.3.30.0180.00618.71
8.3.20.0080.00020.16
8.3.10.0040.00423.53
8.3.00.0060.00319.38
8.2.180.0060.00918.41
8.2.170.0080.01122.96
8.2.160.0000.01420.46
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0030.00619.29
8.2.120.0060.00326.35
8.2.110.0070.00319.26
8.2.100.0040.00817.63
8.2.90.0050.00319.23
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0060.00317.92
8.2.50.0030.00618.07
8.2.40.0050.00319.39
8.2.30.0080.00020.73
8.2.20.0000.00917.85
8.2.10.0030.00518.04
8.2.00.0030.00618.03
8.1.280.0150.00025.92
8.1.270.0060.00323.97
8.1.260.0070.00028.09
8.1.250.0110.00428.09
8.1.240.0060.00322.05
8.1.230.0110.00017.66
8.1.220.0040.00417.78
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0030.00617.35
8.1.180.0040.00418.10
8.1.170.0040.00418.78
8.1.160.0040.00422.01
8.1.150.0040.00418.87
8.1.140.0000.00919.49
8.1.130.0050.00317.61
8.1.120.0000.00717.47
8.1.110.0000.00917.46
8.1.100.0070.00017.52
8.1.90.0000.00817.37
8.1.80.0040.00417.34
8.1.70.0000.00817.45
8.1.60.0060.00617.47
8.1.50.0080.00017.56
8.1.40.0040.00717.48
8.1.30.0060.00317.70
8.1.20.0040.00417.46
8.1.10.0070.00017.43
8.1.00.0030.00517.40
8.0.300.0080.00018.77
8.0.290.0040.00416.88
8.0.280.0030.00318.45
8.0.270.0000.00717.27
8.0.260.0030.00317.25
8.0.250.0030.00416.93
8.0.240.0000.00716.84
8.0.230.0070.00016.89
8.0.220.0000.00816.97
8.0.210.0030.00616.95
8.0.200.0000.00717.00
8.0.190.0030.00616.90
8.0.180.0050.00216.97
8.0.170.0050.00316.95
8.0.160.0030.00517.01
8.0.150.0000.00716.92
8.0.140.0070.00016.98
8.0.130.0030.00313.38
8.0.120.0000.00816.93
8.0.110.0040.00416.96
8.0.100.0000.00716.83
8.0.90.0040.00416.85
8.0.80.0090.01316.88
8.0.70.0060.00316.82
8.0.60.0080.00017.02
8.0.50.0070.00016.76
8.0.30.0030.01617.09
8.0.20.0120.00717.41
8.0.10.0050.00317.16
8.0.00.0090.00816.78
7.4.330.0000.00516.67
7.4.320.0030.00316.56
7.4.300.0000.00716.53
7.4.290.0000.00816.55
7.4.280.0000.00816.48
7.4.270.0040.00416.53
7.4.260.0030.00316.50
7.4.250.0000.00716.55
7.4.240.0020.00516.62
7.4.230.0030.00316.49
7.4.220.0160.00316.64
7.4.210.0090.01216.55
7.4.200.0000.00716.71
7.4.160.0110.00816.63
7.4.150.0060.01217.40
7.4.140.0130.00717.86
7.4.130.0090.00916.53
7.4.120.0160.00516.50
7.4.110.0100.00716.46
7.4.100.0130.01016.59
7.4.90.0140.00416.45
7.4.80.0110.00619.39
7.4.70.0110.00716.64
7.4.60.0030.01316.41
7.4.50.0000.01516.32
7.4.40.0120.00916.49
7.4.30.0100.00716.50
7.4.00.0050.01014.84
7.3.330.0000.00513.43
7.3.320.0000.00513.34
7.3.310.0040.00416.36
7.3.300.0000.00716.35
7.3.290.0080.00716.34
7.3.280.0120.00416.33
7.3.270.0070.01017.40
7.3.260.0170.00016.34
7.3.250.0150.00816.42
7.3.240.0100.00716.39
7.3.230.0160.00616.46
7.3.210.0080.00816.49
7.3.200.0110.00716.44
7.3.190.0100.00716.38
7.3.180.0100.00716.43
7.3.170.0110.00416.49
7.3.160.0060.01016.33
7.3.120.0150.00014.84
7.3.110.0100.00714.82
7.3.100.0090.00615.01
7.3.90.0060.00614.61
7.3.80.0000.01014.76
7.3.70.0000.01214.84
7.3.60.0090.00314.42
7.3.50.0060.00614.64
7.3.40.0030.01414.65
7.3.30.0000.01014.81
7.3.20.0060.00916.73
7.3.10.0070.00716.37
7.3.00.0090.00616.73
7.2.330.0070.01016.45
7.2.320.0130.00716.75
7.2.310.0040.01216.71
7.2.300.0120.00616.73
7.2.290.0080.00816.85
7.2.250.0070.01015.29
7.2.240.0030.01614.81
7.2.230.0000.01315.11
7.2.220.0030.01515.11
7.2.210.0090.00314.97
7.2.200.0090.00614.84
7.2.190.0110.00714.82
7.2.180.0070.01015.07
7.2.170.0000.01514.95
7.2.60.0100.00716.84
7.2.00.0070.00419.44
7.1.330.0060.00615.50
7.1.320.0070.01115.59
7.1.310.0100.00715.34
7.1.300.0090.00915.43
7.1.290.0080.00515.62
7.1.280.0070.00715.48
7.1.270.0040.00815.66
7.1.260.0030.01215.67
7.1.200.0090.00315.64
7.1.100.0040.00718.03
7.1.70.0120.00617.03
7.1.60.0140.01119.36
7.1.50.0000.01316.89
7.1.00.0070.07322.46
7.0.200.0040.00416.79
7.0.60.0100.06019.86
7.0.50.0130.06717.88
7.0.40.0070.08720.18
7.0.30.0500.07320.24
7.0.20.0270.07720.09
7.0.10.0070.05020.19
7.0.00.0170.07320.20
5.6.280.0030.03020.79
5.6.210.0070.07320.50
5.6.200.0070.08018.25
5.6.190.0000.05720.67
5.6.180.0370.05020.43
5.6.170.0470.06320.40
5.6.160.0100.03720.46
5.6.150.0100.07718.19
5.6.140.0170.06718.28
5.6.130.0030.05718.15
5.6.120.0000.04721.02
5.6.110.0030.08721.08
5.6.100.0170.07721.01
5.6.90.0030.05721.10
5.6.80.0270.05720.37
5.5.350.3700.04020.41
5.5.340.0070.06317.96
5.5.330.0000.05720.32
5.5.320.0070.08020.24
5.5.310.0230.05720.34
5.5.300.0130.03017.98
5.5.290.0030.05018.05
5.5.280.0070.05720.87
5.5.270.0030.06320.68
5.5.260.0100.04020.84
5.5.250.0100.07320.80
5.5.240.0270.07020.17

preferences:
54.73 ms | 401 KiB | 5 Q