3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { private $b; function __construct($b = NULL) { if ($b) $this->b = $b; else $this->b = new b($this); $this->b->test(); } public function test() { echo ($this->b !== NULL) ? __METHOD__.":: b not NULL\n" : __METHOD__." :: b NULL\n"; } } class b { private $a; function __construct($a = NULL) { if ($a) $this->a = $a; else $this->a = new a($this); $this->a->test(); } public function test() { echo ($this->a !== NULL) ? __METHOD__.":: a not NULL\n" : __METHOD__." :: a NULL\n"; } } new a;

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.0120.00918.29
8.3.50.0130.00722.05
8.3.40.0070.00718.54
8.3.30.0110.00319.05
8.3.20.0040.00420.16
8.3.10.0000.00822.11
8.3.00.0070.00022.45
8.2.180.0110.00416.63
8.2.170.0070.00722.96
8.2.160.0090.00920.95
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0080.00026.16
8.2.120.0080.00017.38
8.2.110.0110.00622.25
8.2.100.0120.00019.29
8.2.90.0060.00319.09
8.2.80.0000.00918.04
8.2.70.0000.00817.59
8.2.60.0060.00318.03
8.2.50.0040.00418.07
8.2.40.0030.00618.16
8.2.30.0000.00717.96
8.2.20.0070.00017.63
8.2.10.0000.00717.50
8.2.00.0040.00417.56
8.1.280.0000.01425.92
8.1.270.0060.00322.09
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00323.91
8.1.230.0000.01118.98
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0080.00017.23
8.1.190.0060.00317.41
8.1.180.0000.00918.10
8.1.170.0060.00318.58
8.1.160.0080.00022.00
8.1.150.0040.00418.39
8.1.140.0000.00717.40
8.1.130.0030.00317.73
8.1.120.0030.00617.23
8.1.110.0070.00017.41
8.1.100.0040.00417.40
8.1.90.0000.00717.26
8.1.80.0000.00717.27
8.1.70.0030.00317.33
8.1.60.0030.00617.57
8.1.50.0000.00717.49
8.1.40.0040.00417.46
8.1.30.0040.00417.66
8.1.20.0000.00817.57
8.1.10.0040.00417.47
8.1.00.0000.00817.56
8.0.300.0000.00718.77
8.0.290.0000.00717.05
8.0.280.0000.00718.41
8.0.270.0030.00517.32
8.0.260.0080.00016.82
8.0.250.0070.00016.86
8.0.240.0000.00716.98
8.0.230.0040.00416.82
8.0.220.0030.00316.77
8.0.210.0070.00016.70
8.0.200.0000.00616.84
8.0.190.0000.00716.79
8.0.180.0070.00016.75
8.0.170.0000.00716.83
8.0.160.0000.00816.64
8.0.150.0040.00416.71
8.0.140.0040.00316.74
8.0.130.0050.00013.23
8.0.120.0030.00516.70
8.0.110.0040.00416.79
8.0.100.0000.00716.76
8.0.90.0000.00716.70
8.0.80.0120.00316.79
8.0.70.0000.00816.67
8.0.60.0070.00016.71
8.0.50.0000.00816.72
8.0.30.0100.01016.96
8.0.20.0080.01217.40
8.0.10.0030.00316.73
8.0.00.0100.00816.66
7.4.330.0060.00015.00
7.4.320.0000.00616.32
7.4.300.0000.00616.48
7.4.290.0070.00016.41
7.4.280.0000.00716.37
7.4.270.0030.00316.35
7.4.260.0030.00616.43
7.4.250.0000.00816.50
7.4.240.0020.00516.50
7.4.230.0000.00716.43
7.4.220.0100.00716.41
7.4.210.0070.00716.49
7.4.200.0000.00716.57
7.4.190.0000.00716.65
7.4.160.0120.00416.39
7.4.150.0070.01017.40
7.4.140.0110.01117.86
7.4.130.0130.00616.52
7.4.120.0100.00816.51
7.4.110.0030.01316.27
7.4.100.0030.01916.57
7.4.90.0130.00316.37
7.4.80.0100.00719.39
7.4.70.0150.00616.57
7.4.60.0060.01316.34
7.4.50.0000.00816.55
7.4.40.0080.00722.77
7.4.30.0110.00516.40
7.4.00.0000.00914.79
7.3.330.0050.00013.17
7.3.320.0000.00513.30
7.3.310.0000.00716.35
7.3.300.0030.00316.34
7.3.290.0090.01016.32
7.3.280.0060.01016.31
7.3.270.0110.00717.40
7.3.260.0030.01516.54
7.3.250.0110.00716.32
7.3.240.0130.01116.48
7.3.230.0140.00716.39
7.3.210.0030.01316.44
7.3.200.0130.01119.39
7.3.190.0180.00016.30
7.3.180.0070.00716.65
7.3.170.0100.00616.42
7.3.160.0140.00316.37
7.3.120.0000.01714.75
7.3.10.0100.00316.60
7.3.00.0070.00716.69
7.2.330.0120.00416.81
7.2.320.0110.00516.88
7.2.310.0040.01216.57
7.2.300.0100.00716.79
7.2.290.0150.00616.45
7.2.130.0000.01517.13
7.2.120.0030.01016.94
7.2.110.0100.00316.94
7.2.100.0030.01017.02
7.2.90.0100.00316.82
7.2.80.0060.00917.21
7.2.70.0000.01016.75
7.2.60.0060.00916.92
7.2.50.0100.00617.07
7.2.40.0060.00316.78
7.2.30.0040.01116.92
7.2.20.0070.01016.74
7.2.10.0030.00717.02
7.2.00.0060.00818.28
7.1.250.0070.00716.04
7.1.200.0100.00015.71
7.1.100.0070.00717.95
7.1.70.0080.00017.18
7.1.60.0040.02219.82
7.1.50.0100.01317.05
7.1.00.0000.08022.27
7.0.200.0080.00416.90
7.0.140.0100.06722.09
7.0.60.0000.07020.04
7.0.50.0000.04717.85
7.0.40.0070.09020.15
7.0.30.0200.04720.23
7.0.20.0330.07320.25
7.0.10.0100.07320.23
7.0.00.0130.03320.22
5.6.280.0070.07020.79
5.6.210.0100.08320.48
5.6.200.0000.08318.20
5.6.190.0000.07720.42
5.6.180.0300.08020.50
5.6.170.0300.07320.62
5.6.160.0070.05720.50
5.6.150.0000.04718.25
5.6.140.0070.08318.18
5.6.130.0070.04718.23
5.6.120.0100.03721.13
5.6.110.0100.07721.05
5.6.100.0030.08721.04
5.6.90.0030.06321.13
5.6.80.0100.07720.42
5.6.70.4630.03320.39
5.5.350.0070.08720.42
5.5.340.0030.05017.99
5.5.330.0170.04020.28
5.5.320.0370.06320.31
5.5.310.0330.08020.36
5.5.300.0130.06717.98
5.5.290.0070.05017.97
5.5.280.0100.05720.80
5.5.270.0100.06020.68
5.5.260.0070.07720.73
5.5.250.0030.04020.80
5.5.240.0170.07020.16
5.4.450.0530.06719.47
5.4.440.0570.05319.55
5.4.430.0200.04719.52
5.4.420.0100.05319.45
5.4.410.0030.06019.41
5.4.400.2270.00018.84
5.4.390.1300.00018.73
5.4.380.0130.06318.73
5.4.370.0270.05018.78
5.4.360.0370.05018.58
5.4.350.0270.06018.61
5.4.340.0230.05318.74
5.4.320.0070.04012.51
5.4.310.0050.03912.51
5.4.300.0050.03812.51
5.4.290.0060.04412.50
5.4.280.0110.04212.41
5.4.270.0170.05318.64
5.4.260.0100.05318.95
5.4.250.0100.06718.88
5.4.240.0070.05318.85
5.4.230.0130.05718.63
5.4.220.0070.08018.71
5.4.210.0200.04318.91
5.4.200.0100.04718.78
5.4.190.0170.04318.75
5.4.180.0100.05318.94
5.4.170.0170.06718.74
5.4.160.0030.05718.92
5.4.150.0130.07718.95
5.4.140.0070.05716.52
5.4.130.0100.04316.43
5.4.120.0070.05016.63
5.4.110.0300.05016.43
5.4.100.0230.04716.44
5.4.90.0100.05316.54
5.4.80.0100.07016.52
5.4.70.0030.05316.42
5.4.60.0100.04316.30
5.4.50.0200.05716.53
5.4.40.0070.05016.44
5.4.30.0100.04716.56
5.4.20.0130.05716.54
5.4.10.0100.05016.43
5.4.00.0130.05715.84
5.3.290.0020.04412.80
5.3.280.0070.05314.69
5.3.270.0130.04714.70
5.3.260.0030.07714.45
5.3.250.0130.05314.45
5.3.240.0030.06014.45
5.3.230.0170.04314.78
5.3.220.0100.07014.56
5.3.210.0070.06014.57
5.3.200.0070.05314.57
5.3.190.0170.05014.66
5.3.180.0100.04714.63
5.3.170.0170.04314.66
5.3.160.0130.04714.41
5.3.150.0130.05314.63
5.3.140.0100.05014.39
5.3.130.0030.06014.63
5.3.120.0130.04314.54
5.3.110.0100.07014.78
5.3.100.0070.05014.03
5.3.90.0130.06014.11
5.3.80.0130.04314.12
5.3.70.0100.04714.12
5.3.60.0130.04314.09
5.3.50.0230.04713.95
5.3.40.0170.05313.95
5.3.30.0130.04714.00
5.3.20.0070.05713.76
5.3.10.0100.04713.68
5.3.00.0070.07313.73
5.2.170.0070.04711.13
5.2.160.0070.04710.98
5.2.150.0030.04311.24
5.2.140.0030.04311.24
5.2.130.0030.06011.08
5.2.120.0030.04311.20
5.2.110.0070.04011.21
5.2.100.0030.04011.11
5.2.90.0070.05710.94
5.2.80.0000.06311.07
5.2.70.0100.03711.32
5.2.60.0100.05311.22
5.2.50.0130.03711.11
5.2.40.0130.04010.96
5.2.30.0130.04710.88
5.2.20.0070.04310.80
5.2.10.0030.05011.04
5.2.00.0170.03310.80
5.1.60.0100.03010.07
5.1.50.0030.05010.07
5.1.40.0030.0339.91
5.1.30.0070.05010.34
5.1.20.0030.04710.54
5.1.10.0070.03310.08
5.1.00.0000.05010.05
5.0.50.0030.0308.65
5.0.40.0070.0378.47
5.0.30.0070.0478.35
5.0.20.0030.0408.12
5.0.10.0070.0308.16
5.0.00.0030.0478.21
4.4.90.0030.0207.30
4.4.80.0030.0307.30
4.4.70.0030.0207.31
4.4.60.0070.0207.31
4.4.50.0070.0237.31
4.4.40.0070.0377.31
4.4.30.0070.0177.31
4.4.20.0130.0207.31
4.4.10.0000.0277.31
4.4.00.0030.0337.31
4.3.110.0000.0237.31
4.3.100.0070.0177.31
4.3.90.0030.0207.31
4.3.80.0030.0337.31
4.3.70.0030.0307.31
4.3.60.0030.0307.31
4.3.50.0070.0177.31
4.3.40.0000.0337.31
4.3.30.0030.0207.31
4.3.20.0030.0207.31
4.3.10.0000.0237.31
4.3.00.0030.0207.75

preferences:
48.59 ms | 401 KiB | 5 Q