3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { private $number; function __construct($int) { $this->number = $int; } } $i = 50; $test = array(); $string = ""; while ($i >1) { $string .= $i; $i-1; $test[] = new test($i); } echo count($test); echo "<br><br>".$string;

Abusive script

This script was stopped while abusing our resources

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.0460.18569.67
7.4.00.0530.14069.80
7.3.130.0500.19369.57
7.3.120.0400.19869.72
7.3.110.0530.11669.22
7.3.100.0460.09669.51
7.3.90.0300.13269.63
7.3.80.0300.16969.70
7.3.70.0460.11669.49
7.3.60.0460.12569.72
7.3.50.0330.11669.68
7.3.40.0370.12069.46
7.3.30.0330.13469.57
7.3.20.0270.09071.25
7.3.10.0330.11071.16
7.3.00.0170.13671.31
7.2.260.0360.21369.14
7.2.250.0670.18469.45
7.2.240.0460.14569.14
7.2.230.0460.16569.19
7.2.220.0430.13369.16
7.2.210.0600.15469.18
7.2.200.0390.16169.41
7.2.190.0370.18569.30
7.2.180.0400.15269.45
7.2.170.0360.11269.17
7.2.160.0230.13169.27
7.2.150.0370.11671.30
7.2.140.0270.14071.35
7.2.130.2140.14571.24
7.2.120.0030.11670.96
7.2.110.0290.11571.12
7.2.100.2630.12871.00
7.2.90.0100.14271.14
7.2.80.0880.09370.96
7.2.70.0370.12371.22
7.2.60.1270.13171.25
7.2.50.0110.00911.79
7.2.40.0060.01111.95
7.2.30.0070.01511.86
7.2.20.0250.13970.86
7.2.10.0490.12971.32
7.2.00.0380.11272.56
7.1.330.0070.20670.25
7.1.320.0200.22070.05
7.1.310.0200.19469.98
7.1.300.0030.17869.97
7.1.290.0170.20069.88
7.1.280.0170.22070.02
7.1.270.0560.22570.02
7.1.260.0300.21070.11
7.1.250.0100.19670.24
7.1.240.0130.17970.25
7.1.230.0320.21370.04
7.1.220.0330.18770.21
7.1.210.0430.17969.96
7.1.200.0420.14270.00
7.1.190.0330.17670.11
7.1.180.0910.17969.92
7.1.170.0340.20269.91
7.1.160.0200.18470.16
7.1.150.0100.19369.99
7.1.140.0100.19869.89
7.1.130.0430.17769.79
7.1.120.0340.19570.23
7.1.110.0630.17170.09
7.1.100.1700.15571.26
7.1.90.0200.18970.05
7.1.80.0580.19069.92
7.1.70.0770.14970.71
7.1.60.0230.18170.95
7.1.50.0320.15479.65
7.1.40.0260.18870.02
7.1.30.0460.17670.11
7.1.20.0250.20770.17
7.1.10.0170.18970.12
7.1.00.0230.19373.38
7.0.330.0100.21369.86
7.0.320.0200.17869.56
7.0.310.0400.19169.47
7.0.300.0170.18569.38
7.0.290.0420.17969.90
7.0.280.0360.17569.75
7.0.270.0550.18869.70
7.0.260.0270.20169.47
7.0.250.0340.17169.68
7.0.240.0360.17369.48
7.0.230.0130.19569.83
7.0.220.0330.20069.76
7.0.210.0340.21769.73
7.0.200.3010.18069.74
7.0.190.0140.00511.07
7.0.180.0320.19069.88
7.0.170.0390.19469.64
7.0.160.0310.17769.80
7.0.150.0270.20769.76
7.0.140.0400.18869.83
7.0.130.0270.18269.88
7.0.120.0230.18869.52
7.0.110.0360.17269.86
7.0.100.0230.18169.87
7.0.90.0170.21969.77
7.0.80.0360.21169.52
7.0.70.0200.18369.53
7.0.60.0540.18772.13
7.0.50.0290.17470.92
7.0.40.0200.19538.72
7.0.30.0610.17038.89
7.0.20.0530.17638.92
7.0.10.0200.16638.74
7.0.00.0220.17638.91
5.6.400.0380.18975.69
5.6.390.0330.16775.77
5.6.380.0500.20275.75
5.6.370.0480.21175.48
5.6.360.0400.25275.29
5.6.350.0440.19775.39
5.6.340.0460.17975.79
5.6.330.0460.18675.66
5.6.320.0260.08640.28
5.6.310.0200.0029.02
5.6.300.0510.17875.34
5.6.290.0540.19075.75
5.6.280.0440.17379.42
5.6.270.0470.16475.45
5.6.260.0440.18575.57
5.6.250.0400.19475.40
5.6.240.0240.19675.36
5.6.230.0430.17875.54
5.6.220.0410.18675.38
5.6.210.0320.16078.56
5.6.200.0340.20677.22
5.6.190.0340.16578.47
5.6.180.2560.15478.50
5.6.170.0450.16278.41
5.6.160.0420.17178.28
5.6.150.0300.20077.22
5.6.140.0400.18277.39
5.6.130.0280.16977.36
5.6.120.0320.18378.61
5.6.110.0430.17978.82
5.6.100.0410.21478.74
5.6.90.0320.18278.63
5.6.80.0220.18578.16
5.6.70.3740.16878.32
5.6.60.0530.20575.44
5.6.50.0470.18175.43
5.6.40.0430.19475.34
5.6.30.0400.18175.10
5.6.20.0440.16875.29
5.6.10.0240.20675.26
5.6.00.0300.21275.38
5.5.380.0620.18475.68
5.5.370.0370.21275.20
5.5.360.0430.18575.50
5.5.350.0390.19878.39
5.5.340.0330.15377.26
5.5.330.0390.16878.36
5.5.320.0640.17478.33
5.5.310.0520.17478.23
5.5.300.0320.21377.20
5.5.290.0370.20977.22
5.5.280.0370.18778.67
5.5.270.0280.19578.63
5.5.260.0340.20778.52
5.5.250.0250.18078.59
5.5.240.0540.16578.13
5.5.230.0430.17775.23
5.5.220.0340.18175.50
5.5.210.0400.20075.51
5.5.200.0260.19575.35
5.5.190.0480.19275.32
5.5.180.0430.19275.55
5.5.170.0300.22575.13
5.5.160.0310.18375.00
5.5.150.0450.17375.05
5.5.140.0280.18375.34
5.5.130.0360.20175.44
5.5.120.0400.18875.46
5.5.110.0330.17975.17
5.5.100.0270.18675.05
5.5.90.0260.18575.49
5.5.80.0590.16475.14
5.5.70.0430.17875.26
5.5.60.0340.20375.14
5.5.50.0430.20975.44
5.5.40.0390.18075.33
5.5.30.0240.21475.37
5.5.20.0450.19275.23
5.5.10.0270.21275.05
5.5.00.0300.23675.00
5.4.450.1000.23476.32
5.4.440.1090.20976.37
5.4.430.0950.29676.25
5.4.420.1260.26676.22
5.4.410.0730.20576.17
5.4.400.0650.22375.98
5.4.390.0630.22476.18
5.4.380.0800.23576.10
5.4.370.0830.24076.00
5.4.360.0810.23176.26
5.4.350.1110.25176.05
5.4.340.0560.22776.16
5.4.330.0360.19671.94
5.4.320.0960.23776.09
5.4.310.1150.23276.15
5.4.300.0930.19076.12
5.4.290.0770.22276.04
5.4.280.0980.24375.94
5.4.270.0930.20176.04
5.4.260.1150.21576.09
5.4.250.0900.22976.02
5.4.240.0880.21076.08
5.4.230.0880.20076.07
5.4.220.0930.20976.15
5.4.210.1030.27275.96
5.4.200.0780.20974.87
5.4.190.0850.21575.98
5.4.180.0700.20676.02
5.4.170.0780.20675.85
5.4.160.0680.21776.18
5.4.150.0780.23176.08
5.4.140.1050.21674.77
5.4.130.0970.25374.71
5.4.120.0760.21174.78
5.4.110.0780.21174.80
5.4.100.0960.23474.80
5.4.90.0930.21174.89
5.4.80.1100.28074.71
5.4.70.0780.22774.69
5.4.60.0980.21374.68
5.4.50.0900.25174.65
5.4.40.0880.24074.79
5.4.30.1020.22074.81
5.4.20.1080.20574.75
5.4.10.0880.20974.81
5.4.00.0820.22474.34

preferences:
39.03 ms | 400 KiB | 5 Q