3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Node { public $parent = NULL; public $childs = array(); function __construct(Node $parent=NULL) { if ($parent) { $parent->childs[] = $this; } $this->childs[] = $this; } function __destruct() { $this->childs = NULL; } } define("MAX", 16); while (true) { printf("Memory: %6.2fMB ->", memory_get_usage()/1024/1024); $top = new Node(); for ($i=0 ; $i<MAX ; $i++) { $ci = new Node($top); for ($j=0 ; $j<MAX ; $j++) { $cj = new Node($ci); for ($k=0 ; $k<MAX ; $k++) { $ck = new Node($cj); } } } printf(" %6.2fMB\n", memory_get_usage()/1024/1024); }

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.0172.47923.24
7.4.00.0102.48323.28
7.3.130.0232.47322.24
7.3.120.0202.46422.36
7.3.110.0172.47921.97
7.3.100.0232.46822.36
7.3.90.0232.47122.25
7.3.80.0132.48222.05
7.3.70.0032.48322.00
7.3.60.0132.48322.21
7.3.50.0132.48222.24
7.3.40.0202.47621.92
7.3.30.0132.48222.34
7.3.20.0072.48722.96
7.3.10.0072.48923.08
7.3.00.0032.49222.91
7.2.260.0032.49022.91
7.2.250.0172.47923.18
7.2.240.0132.48122.94
7.2.230.0032.48322.82
7.2.220.0202.47622.89
7.2.210.0072.48723.28
7.2.200.0202.47522.82
7.2.190.0172.47922.60
7.2.180.0272.46823.04
7.2.170.0072.48922.95
7.2.160.0302.46422.86
7.2.150.0202.46525.01
7.2.140.0372.45525.29
7.2.130.0232.47125.11
7.2.120.0332.45325.20
7.2.110.0202.47525.24
7.2.100.0202.47525.20
7.2.90.0102.47525.33
7.2.80.2492.23624.88
7.2.70.0172.47925.26
7.2.60.0091.55825.18
7.2.50.0331.15724.96
7.2.40.0461.41525.29
7.2.30.0171.82325.39
7.2.20.0331.71925.15
7.2.10.0231.97224.88
7.2.00.0132.02525.04
7.1.330.0172.47824.14
7.1.320.0102.48423.95
7.1.310.0102.48623.98
7.1.300.0032.48723.88
7.1.290.0172.47024.03
7.1.280.0072.48923.94
7.1.270.0072.48924.10
7.1.260.0172.47924.32
7.1.250.0102.48524.07
7.1.240.0152.46824.03
7.1.230.0202.47224.22
7.1.220.0272.46523.74
7.1.210.0102.46923.75
7.1.200.0172.47824.20
7.1.190.3022.18024.18
7.1.180.0261.32724.06
7.1.170.0461.56223.99
7.1.160.0362.02224.25
7.1.150.0072.13724.29
7.1.140.0421.96824.13
7.1.130.0301.92924.12
7.1.120.0291.43024.14
7.1.110.0291.67223.89
7.1.100.0302.12624.19
7.1.90.0232.25124.03
7.1.80.0232.06123.94
7.1.70.0131.94524.27
7.1.60.0202.25924.27
7.1.50.0241.38724.31
7.1.40.0281.43823.98
7.1.30.0052.01924.06
7.1.20.0201.41924.06
7.1.10.0252.07123.79
7.1.00.0191.57924.13
7.0.330.0232.47123.68
7.0.320.0232.47223.53
7.0.310.0172.47023.69
7.0.300.0331.58123.44
7.0.290.0231.67323.94
7.0.280.0201.97723.84
7.0.270.0162.23123.76
7.0.260.0392.02123.86
7.0.250.0621.93323.64
7.0.240.0532.10723.63
7.0.230.0502.18823.55
7.0.220.0352.15123.62
7.0.210.1002.18523.66
7.0.200.0982.14223.76
7.0.190.0131.68423.60
7.0.180.0231.67223.75
7.0.170.0531.58423.75
7.0.160.0311.85923.65
7.0.150.0361.89123.81
7.0.140.0261.39323.66
7.0.130.0201.91223.76
7.0.120.0302.02823.83
7.0.110.0221.81023.68
7.0.100.0201.77323.92
7.0.90.0301.96823.92
7.0.80.0262.23123.84
7.0.70.0392.26023.75
7.0.60.0412.27723.70
7.0.50.0491.76723.85
7.0.40.0201.58013.53
7.0.30.0301.76213.89
7.0.20.0701.99613.90
7.0.10.0191.61413.91
7.0.00.0251.62113.80
5.6.400.0332.45923.75
5.6.390.0202.47323.25
5.6.380.0232.46823.51
5.6.370.0232.47323.60
5.6.360.0301.97623.39
5.6.350.0162.31123.65
5.6.340.0301.73823.32
5.6.330.0231.03223.53
5.6.320.0271.74623.21
5.6.310.0231.96023.43
5.6.300.0251.62623.35
5.6.290.0231.76223.52
5.6.280.0192.22023.66
5.6.270.0171.97423.49
5.6.260.0121.67523.55
5.6.250.0371.73823.30
5.6.240.0102.10423.43
5.6.230.0082.29923.23
5.6.220.0122.31423.45
5.6.210.0232.26623.73
5.6.200.0301.42423.35
5.6.190.0541.54923.78
5.6.180.0302.10823.25
5.6.170.0272.17923.50
5.6.160.0271.84223.45
5.6.150.0581.72123.30
5.6.140.0271.90823.28
5.6.130.0172.10123.38
5.6.120.0321.93823.70
5.6.110.0132.02723.32
5.6.100.0272.20423.68
5.6.90.0251.94923.49
5.6.80.0442.00123.50
5.6.70.0522.09723.27
5.6.60.0532.01623.38
5.6.50.0132.06423.16
5.6.40.0202.16523.40
5.6.30.0172.19823.24
5.6.20.0422.08223.42
5.6.10.0231.76923.34
5.6.00.0351.85823.14
5.5.380.0172.27823.04
5.5.370.0452.27723.29
5.5.360.0102.27223.27
5.5.350.0321.69623.38
5.5.340.0151.80222.97
5.5.330.0172.11023.10
5.5.320.0292.23423.35
5.5.310.0232.16323.20
5.5.300.0132.17623.14
5.5.290.0302.11523.44
5.5.280.0212.10823.11
5.5.270.0092.17923.09
5.5.260.0402.17923.04
5.5.250.0122.13623.25
5.5.240.0352.15023.28
5.5.230.0202.15023.06
5.5.220.0202.10723.15
5.5.210.0202.19322.93
5.5.200.0132.22923.35
5.5.190.0261.92922.70
5.5.180.0231.95023.36
5.5.170.0132.16622.95
5.5.160.0302.16722.95
5.5.150.0332.19323.28
5.5.140.0332.16823.38
5.5.130.0202.23623.17
5.5.120.0502.17823.01
5.5.110.0132.22623.46
5.5.100.0232.19022.98
5.5.90.0272.18623.16
5.5.80.0292.23823.10
5.5.70.0302.13423.23
5.5.60.0232.25622.93
5.5.50.0252.18522.93
5.5.40.0232.26723.03
5.5.30.0292.23923.04
5.5.20.0362.21622.91
5.5.10.0252.08923.29
5.5.00.0202.14622.99
5.4.450.0302.36220.00
5.4.440.0102.40319.94
5.4.430.0202.37120.02
5.4.420.0172.41219.91
5.4.410.0172.33519.93
5.4.400.0102.43520.18
5.4.390.0352.41719.91
5.4.380.0262.36319.95
5.4.370.0332.40320.18
5.4.360.0232.36019.80
5.4.350.0072.44119.94
5.4.340.0322.34519.93
5.4.330.0282.33620.09
5.4.320.0302.33419.74
5.4.310.0232.40019.57
5.4.300.0202.39420.04
5.4.290.0202.38920.13
5.4.280.0212.40319.84
5.4.270.0172.42119.84
5.4.260.0302.37719.84
5.4.250.0032.38620.18
5.4.240.0482.33819.83
5.4.230.0202.32019.95
5.4.220.0362.39619.91
5.4.210.0172.39620.12
5.4.200.0332.34019.69
5.4.190.0132.39619.96
5.4.180.0102.40219.87
5.4.170.0162.40719.83
5.4.160.0172.35619.85
5.4.150.0302.39420.05
5.4.140.0102.41420.06
5.4.130.0272.39020.00
5.4.120.0222.38319.68
5.4.110.0232.43619.92
5.4.100.0172.38819.89
5.4.90.0140.13019.42
5.4.80.0140.12319.44
5.4.70.0370.14419.41
5.4.60.0190.15819.65
5.4.50.0220.15519.59
5.4.40.0200.11819.48
5.4.30.0150.11519.55
5.4.20.0110.15819.58
5.4.10.0200.14119.61
5.4.00.0130.12619.54
5.3.290.0472.23523.47
5.3.280.0232.40723.22
5.3.270.0352.38623.52
5.3.260.0132.40423.57
5.3.250.0332.39823.48
5.3.240.0072.40923.40
5.3.230.0242.38723.48
5.3.220.0302.38423.43
5.3.210.0402.34723.38
5.3.200.0232.37023.39
5.3.190.0400.21522.83
5.3.180.0200.24623.04
5.3.170.0140.23422.94
5.3.160.0190.20223.06
5.3.150.0160.23023.05
5.3.140.0160.23723.02
5.3.130.0180.20022.79
5.3.120.0210.19322.89
5.3.110.0170.20722.81
5.3.100.0240.22022.74
5.3.90.0180.24322.98
5.3.80.0160.27022.71
5.3.70.0130.25922.79
5.3.60.0150.22422.88
5.3.50.0160.24822.76
5.3.40.0140.23122.71
5.3.30.0220.24722.92
5.3.20.0230.20622.60
5.3.10.0230.20222.59
5.3.00.0130.19522.43

preferences:
40.85 ms | 400 KiB | 5 Q