3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { function __construct($b = NULL) { if ($b) $this->b = $b; else $this->b = new b($this); } public function test() { echo ($this->b !== NULL) ? __METHOD__.":: b not NULL\n" : __METHOD__." :: b NULL\n"; } } class b { function __construct($a = NULL) { if ($a) $this->a = $a; else $this->a = new a($this); } public function test() { ($this->a !== NULL) ? echo __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)
5.4.270.0170.03718.98
5.4.260.0200.03318.84
5.4.250.0200.03319.24
5.4.240.0170.03719.09
5.4.230.0200.03719.08
5.4.220.0200.03319.08
5.4.210.0300.05318.99
5.4.200.0170.04018.83
5.4.190.0200.03718.86
5.4.180.0200.04719.23
5.4.170.0170.03719.14
5.4.160.0070.04719.22
5.4.150.0130.04019.29
5.4.140.0170.05016.32
5.4.130.0170.03316.51
5.4.120.0170.03316.38
5.4.110.0130.04016.45
5.4.100.0170.03316.61
5.4.90.0130.03716.59
5.4.80.0200.03016.57
5.4.70.0170.03316.44
5.4.60.0130.04016.54
5.4.50.0130.03716.26
5.4.40.0200.03716.26
5.4.30.0130.04016.34
5.4.20.0130.03716.16
5.4.10.0200.03316.34
5.4.00.0170.04015.71
5.3.280.0270.03714.55
5.3.270.0230.03014.63
5.3.260.0200.03314.63
5.3.250.0300.07014.67
5.3.240.0100.04314.61
5.3.230.0130.04014.73
5.3.220.0170.03714.56
5.3.210.0130.04014.56
5.3.200.0170.03714.50
5.3.190.0170.03714.50
5.3.180.0330.03714.80
5.3.170.0230.04014.54
5.3.160.0300.03314.65
5.3.150.0170.03714.47
5.3.140.0270.03714.57
5.3.130.0200.04714.57
5.3.120.0300.04014.48
5.3.110.0200.03314.78
5.3.100.0230.03013.97
5.3.90.0130.04014.00
5.3.80.0200.04014.11
5.3.70.0170.03313.93
5.3.60.0200.03014.16
5.3.50.0230.03313.93
5.3.40.0130.04014.09
5.3.30.0170.04713.83
5.3.20.0100.04013.64
5.3.10.0170.03313.67
5.3.00.0200.03713.70
5.2.170.0400.02011.06
5.2.160.0230.02711.30
5.2.150.0200.03311.07
5.2.140.0200.02711.07
5.2.130.0200.05311.03
5.2.120.0130.03311.13
5.2.110.0130.03311.19
5.2.100.0200.05311.12
5.2.90.0200.04711.19
5.2.80.0130.04011.18
5.2.70.0200.04311.11
5.2.60.0170.03711.03
5.2.50.0270.05311.03
5.2.40.0170.05711.09
5.2.30.0170.04311.20
5.2.20.0230.03711.06
5.2.10.0170.04310.95
5.2.00.0130.05310.73
5.1.60.0130.03010.09
5.1.50.0130.0309.99
5.1.40.0130.0239.93
5.1.30.0170.05310.27
5.1.20.0170.04710.48
5.1.10.0130.0279.98
5.1.00.0030.03010.16
5.0.50.0100.0308.61
5.0.40.0130.0508.55
5.0.30.0070.0308.22
5.0.20.0070.0278.44
5.0.10.0070.0178.11
5.0.00.0130.0538.29
4.4.90.0030.0207.62
4.4.80.0300.0107.62
4.4.70.0030.0237.62
4.4.60.0070.0177.62
4.4.50.0070.0137.62
4.4.40.0100.0477.62
4.4.30.0030.0237.62
4.4.20.0070.0377.62
4.4.10.0100.0107.62
4.4.00.0070.0277.62
4.3.110.0030.0277.62
4.3.100.0070.0177.62
4.3.90.0070.0177.62
4.3.80.0070.0407.62
4.3.70.0070.0137.62
4.3.60.0100.0307.62
4.3.50.0070.0277.62
4.3.40.0070.0237.62
4.3.30.0000.0177.62
4.3.20.0000.0177.62
4.3.10.0000.0177.62
4.3.00.0200.0177.62

preferences:
142.45 ms | 1394 KiB | 7 Q