3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL - E_STRICT); class A { private $message; public function __construct($msg) { $this->message = $msg; } public function test() { $self = 'this'; if (isset($this) === false) { $$self = new self('bar'); } $$self->show(); } public function show() { echo 'show: ', $this->message, "\n"; } } $o = new A('foo'); $o->test(); A::test();

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.68
8.3.50.0070.01116.68
8.3.40.0120.00618.92
8.3.30.0070.00718.86
8.3.20.0070.00020.20
8.3.10.0030.00521.77
8.3.00.0040.00422.46
8.2.180.0070.01525.92
8.2.170.0110.00919.10
8.2.160.0090.00622.96
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0060.00026.16
8.2.120.0040.00420.78
8.2.110.0070.00321.02
8.2.100.0080.00417.84
8.2.90.0080.00018.03
8.2.80.0000.00819.22
8.2.70.0030.00517.80
8.2.60.0040.00418.03
8.2.50.0060.00318.10
8.2.40.0040.00420.66
8.2.30.0030.00719.16
8.2.20.0040.00418.02
8.2.10.0040.00418.11
8.2.00.0040.00418.21
8.1.280.0070.01125.92
8.1.270.0080.00022.19
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00619.14
8.1.230.0070.00420.88
8.1.220.0000.00817.78
8.1.210.0080.00018.96
8.1.200.0090.00317.13
8.1.190.0040.00417.35
8.1.180.0090.00018.10
8.1.170.0050.00318.70
8.1.160.0060.00318.92
8.1.150.0030.00320.22
8.1.140.0060.00619.47
8.1.130.0000.00718.80
8.1.120.0000.00717.51
8.1.110.0080.00017.52
8.1.100.0040.00417.52
8.1.90.0040.00417.47
8.1.80.0040.00417.38
8.1.70.0000.00717.45
8.1.60.0070.00317.64
8.1.50.0000.00717.49
8.1.40.0000.00717.51
8.1.30.0000.00817.55
8.1.20.0090.00017.59
8.1.10.0080.00017.51
8.1.00.0000.00817.39
8.0.300.0020.00520.01
8.0.290.0000.00916.63
8.0.280.0030.00318.40
8.0.270.0000.00717.25
8.0.260.0000.00619.00
8.0.250.0030.00316.93
8.0.240.0000.00717.00
8.0.230.0040.00417.03
8.0.220.0000.00816.98
8.0.210.0000.00716.89
8.0.200.0040.00417.00
8.0.190.0060.00316.88
8.0.180.0000.00816.96
8.0.170.0000.00716.98
8.0.160.0040.00316.82
8.0.150.0040.00416.95
8.0.140.0030.00516.89
8.0.130.0000.00513.40
8.0.120.0030.00616.95
8.0.110.0030.00316.89
8.0.100.0040.00416.98
8.0.90.0040.00416.95
8.0.80.0160.00016.89
8.0.70.0070.00016.89
8.0.60.0040.00416.75
8.0.50.0080.00016.88
8.0.30.0110.00817.05
8.0.20.0140.00517.40
8.0.10.0040.00416.96
8.0.00.0060.01216.84
7.4.330.0000.00515.55
7.4.320.0030.00316.63
7.4.300.0030.00316.36
7.4.290.0040.00416.60
7.4.280.0030.00616.34
7.4.270.0030.00416.45
7.4.260.0030.00316.46
7.4.250.0040.00416.48
7.4.240.0000.00916.64
7.4.230.0000.00716.62
7.4.220.0100.01616.56
7.4.210.0110.00416.46
7.4.200.0040.00416.59
7.4.160.0080.00816.50
7.4.150.0110.00717.40
7.4.140.0090.01217.86
7.4.130.0190.00316.43
7.4.120.0090.01216.59
7.4.110.0060.01016.68
7.4.100.0120.00616.37
7.4.90.0110.00716.43
7.4.80.0130.00519.39
7.4.70.0090.00816.69
7.4.60.0100.00716.45
7.4.50.0070.00716.71
7.4.40.0100.00716.74
7.4.30.0070.01016.68
7.4.10.0120.00615.05
7.4.00.0100.00814.95
7.3.330.0020.00213.37
7.3.320.0020.00213.43
7.3.310.0000.00716.46
7.3.300.0060.00016.43
7.3.290.0000.00716.26
7.3.280.0100.00916.40
7.3.270.0080.01117.40
7.3.260.0140.00416.47
7.3.240.0080.01016.50
7.3.230.0100.01016.57
7.3.210.0080.00816.40
7.3.200.0160.00616.35
7.3.190.0090.01216.58
7.3.180.0000.01616.50
7.3.170.0180.00616.46
7.3.160.0150.00316.37
7.3.130.0030.01414.83
7.3.120.0100.00714.87
7.3.110.0060.01214.83
7.3.100.0060.00914.71
7.3.90.0060.01214.63
7.3.80.0070.00714.97
7.3.70.0130.00314.96
7.3.60.0090.00914.63
7.3.50.0100.00714.73
7.3.40.0060.00914.86
7.3.30.0030.01414.92
7.3.20.0090.00916.79
7.3.10.0060.00616.60
7.3.00.0140.00016.61
7.2.330.0030.01416.87
7.2.320.0140.00316.74
7.2.310.0130.01016.77
7.2.300.0130.00316.46
7.2.290.0080.01216.50
7.2.260.0100.00715.17
7.2.250.0060.01215.18
7.2.240.0030.01315.12
7.2.230.0120.00315.02
7.2.220.0090.00615.12
7.2.210.0070.00315.18
7.2.200.0030.01114.86
7.2.190.0030.01315.13
7.2.180.0070.00314.96
7.2.170.0110.00414.91
7.2.160.0120.00315.24
7.2.150.0060.01316.75
7.2.140.0060.00316.88
7.2.130.0110.00417.03
7.2.120.0040.01116.79
7.2.110.0200.01016.77
7.2.100.0040.01217.03
7.2.90.0040.01516.98
7.2.80.0080.00317.11
7.2.70.0040.01116.98
7.2.60.0120.00217.11
7.2.50.0060.00916.91
7.2.40.0030.01217.00
7.2.30.0030.00717.01
7.2.20.0110.00417.02
7.2.10.0030.00716.66
7.2.00.0080.00818.15
7.1.330.0030.01015.98
7.1.320.0030.01015.99
7.1.310.0000.01015.60
7.1.300.0000.01515.99
7.1.290.0000.01215.88
7.1.280.0030.01315.95
7.1.270.0090.00915.85
7.1.260.0080.00815.79
7.1.250.0130.00015.61
7.1.240.0060.00615.76
7.1.230.0100.00715.76
7.1.220.0060.00916.02
7.1.210.0150.00015.95
7.1.200.0040.00715.82
7.1.190.0000.01415.87
7.1.180.0000.01115.95
7.1.170.0060.00915.91
7.1.160.0040.00915.83
7.1.150.0040.00815.71
7.1.140.0000.01115.93
7.1.130.0090.00315.76
7.1.120.0040.00815.90
7.1.110.0000.01415.92
7.1.100.0080.00415.90
7.1.90.0070.00715.88
7.1.80.0060.00615.74
7.1.70.0150.00716.39
7.1.60.0060.00716.33
7.1.50.0370.01024.49
7.1.40.0500.00324.18
7.1.30.0430.00824.35
7.1.20.0420.01024.20
7.1.10.0400.00815.24
7.1.00.0250.01215.27
7.0.330.0000.01215.27
7.0.320.0120.00415.18
7.0.310.0080.00515.23
7.0.300.0030.01315.14
7.0.290.0030.01015.21
7.0.280.0040.00815.05
7.0.270.0000.01215.43
7.0.260.0080.00815.51
7.0.250.0120.00015.39
7.0.240.0030.00815.26
7.0.230.0030.01015.63
7.0.220.0040.00815.53
7.0.210.0040.00815.18
7.0.200.0070.00815.89
7.0.190.0450.01514.93
7.0.180.0320.01214.84
7.0.170.0370.00914.99
7.0.160.0350.00715.00
7.0.150.0240.00915.00
7.0.140.0430.01314.97
7.0.130.0320.00814.91
7.0.120.0450.00815.10
7.0.110.0440.00814.88
7.0.100.0420.01214.98
7.0.90.0550.00814.95
7.0.80.0470.01015.05
7.0.70.0320.01015.00
7.0.60.0400.01014.68
7.0.50.0450.00714.85
7.0.40.0520.01013.98
7.0.30.0460.00514.18
7.0.20.0510.00514.03
7.0.10.0270.01113.92
7.0.00.0390.00813.90
5.6.400.0090.00614.55
5.6.390.0100.00714.36
5.6.380.0000.01514.24
5.6.370.0040.01314.21
5.6.360.0060.00614.48
5.6.350.0100.00713.98
5.6.340.0000.01214.70
5.6.330.0000.01314.57
5.6.320.0040.00714.54
5.6.310.0090.00914.72
5.6.300.0000.01414.40
5.6.290.0030.00714.64
5.6.280.0090.00614.64
5.6.270.0070.00714.82
5.6.260.0000.01414.34
5.6.250.0090.00614.46
5.6.240.0060.01214.30
5.6.230.0040.01114.47
5.6.220.0030.00814.47
5.6.210.0000.00914.41
5.6.200.0030.01414.23
5.6.190.0000.01314.53
5.6.180.0030.00914.32
5.6.170.0090.00614.46
5.6.160.0030.00914.49
5.6.150.0040.01114.46
5.6.140.0040.00714.50
5.6.130.0000.01714.46
5.6.120.0080.00814.08
5.6.110.0070.00714.37
5.6.100.0060.00914.52
5.6.90.0060.00914.41
5.6.80.0030.00914.37
5.6.70.0040.00414.20
5.6.60.0060.00614.26
5.6.50.0040.00814.32
5.6.40.0100.00314.54
5.6.30.0030.01014.35
5.6.20.0000.01114.48
5.6.10.0090.00314.35
5.6.00.0030.01014.11

preferences:
57.03 ms | 400 KiB | 5 Q