3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time_start = microtime(true); $myArray = array(); for ( $i = 0; $i < 100000; ++$i ){ $myArray[] = $i; $myArray[] = 'test a string';} $time_end = microtime(true); printf("Took %f seconds for array[]\n", $time_end - $time_start); $time_start = microtime(true); $myArray = array(); for ( $i = 0; $i < 100000; ++$i ){ array_push($myArray, $i); array_push($myArray, 'test a string');} $time_end = microtime(true); printf("Took %f seconds for array_push\n", $time_end - $time_start);

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.00.0230.02321.59
7.3.120.0240.02421.80
7.3.110.0160.02921.73
7.3.100.0220.01621.41
7.3.90.0030.02921.48
7.3.80.0220.01121.80
7.3.70.0170.01721.62
7.3.60.0130.01921.49
7.3.50.0080.02721.61
7.3.40.0160.02521.64
7.3.30.0060.03121.35
7.3.20.0220.02522.75
7.3.10.0210.01822.34
7.3.00.0240.02122.28
7.2.250.0290.01022.11
7.2.240.0200.03321.74
7.2.230.0220.01621.76
7.2.220.0130.02021.84
7.2.210.0070.02321.77
7.2.200.0130.02321.88
7.2.190.0060.02921.80
7.2.180.0190.02221.95
7.2.170.0070.03421.89
7.2.00.0060.01925.24
7.1.330.0200.03721.75
7.1.320.0000.04421.48
7.1.310.0070.04321.94
7.1.300.0070.04621.98
7.1.290.0130.04221.65
7.1.280.0230.03921.89
7.1.270.0130.04321.71
7.1.260.0350.03521.79
7.1.70.0100.01724.64
7.1.60.0170.03725.07
7.1.50.0030.04824.86
7.1.00.0070.10330.15
7.0.200.0170.01724.41
7.0.140.0000.10729.84
7.0.70.0000.10329.52
7.0.60.0130.09329.53
7.0.50.0030.05729.95
7.0.40.0100.10027.88
7.0.30.0130.10027.88
7.0.20.0130.09727.79
7.0.10.0100.09727.92
7.0.00.0000.07027.89
5.6.280.0300.15749.19
5.6.220.0330.16349.00
5.6.210.0030.11748.97
5.6.200.0130.12049.41
5.6.190.0200.16049.33
5.6.180.0300.15749.40
5.6.170.0170.11049.28
5.6.160.0370.16749.40
5.6.150.0200.15349.44
5.6.140.0230.16749.37
5.6.130.0370.16349.25
5.6.120.0330.16049.25
5.6.110.0200.16349.48
5.6.100.0170.17049.48
5.6.90.0230.15749.43
5.6.80.0200.14048.80
5.6.70.0330.16048.81
5.6.60.0300.16048.80
5.6.50.0100.17348.64
5.6.40.0170.15748.79
5.6.30.0330.12748.75
5.6.20.0300.13348.84
5.6.10.0200.14748.71
5.6.00.0200.16048.68
5.5.360.0130.15348.69
5.5.350.0330.15748.79
5.5.340.0130.13049.21
5.5.330.0200.14749.06
5.5.320.0130.17049.14
5.5.310.0230.17049.24
5.5.300.0300.15749.25
5.5.290.0200.13749.23
5.5.280.0100.18349.20
5.5.270.0400.16048.91
5.5.260.0200.16749.21
5.5.250.0130.16748.86
5.5.240.0270.16748.59
5.5.230.0270.13348.60
5.5.220.0270.09748.56
5.5.210.0200.15048.53
5.5.200.0330.14748.45
5.5.190.0230.16048.55
5.5.180.0200.12048.45
5.5.160.0430.14048.56
5.5.150.0130.12048.45
5.5.140.0230.16348.58
5.5.130.0330.15748.54
5.5.120.0300.17048.54
5.5.110.0100.16348.44
5.5.100.0270.15348.49
5.5.90.0330.14048.48
5.5.80.0100.15748.44
5.5.70.0370.14748.29
5.5.60.0230.10048.38
5.5.50.0200.15748.44
5.5.40.0200.16048.38
5.5.30.0400.16048.31
5.5.20.0170.14348.40
5.5.10.0270.14048.30
5.5.00.0170.11348.36
5.4.450.0170.15047.55
5.4.440.0300.15747.63
5.4.430.0200.15747.67
5.4.420.0130.17747.54
5.4.410.0200.17347.40
5.4.400.0170.16347.22
5.4.390.0200.17047.24
5.4.380.0300.15047.38
5.4.370.0300.15347.38
5.4.360.0200.17747.04
5.4.350.0330.13747.21
5.4.340.0200.15747.07
5.4.320.0200.17747.22
5.4.310.0270.16347.21
5.4.300.0270.12347.30
5.4.290.0170.15047.23
5.4.280.0130.10747.07
5.4.270.0270.16347.30
5.4.260.0270.09747.40
5.4.250.0100.14347.07
5.4.240.0170.11047.21
5.4.230.0200.10047.22
5.4.220.0200.16347.29
5.4.210.0300.13347.20
5.4.200.0300.14347.42
5.4.190.0200.16347.39
5.4.180.0270.17347.27
5.4.170.0330.12047.29
5.4.160.0100.11747.20
5.4.150.0170.10347.19
5.4.140.0100.11044.54
5.4.130.0300.14044.62
5.4.120.0200.10344.45
5.4.110.0200.10044.60
5.4.100.0130.10744.53
5.4.90.0100.11044.73
5.4.80.0170.10744.73
5.4.70.0100.11044.55
5.4.60.0230.16344.49
5.4.50.0200.08344.57
5.4.40.0170.10044.62
5.4.30.0230.09344.48
5.4.20.0330.12744.48
5.4.10.0270.14744.57
5.4.00.0300.15744.11
5.3.290.0200.18346.47
5.3.280.0030.12346.39
5.3.270.0100.13046.36
5.3.260.0170.11346.44
5.3.250.0100.13046.44
5.3.240.0170.15046.42
5.3.230.0070.15346.35
5.3.220.0200.14046.23
5.3.210.0170.18346.37
5.3.200.0030.15746.19
5.3.190.0030.12346.39
5.3.180.0200.10746.39
5.3.170.0230.14346.20
5.3.160.0030.13346.19
5.3.150.0100.12046.37
5.3.140.0100.11346.34
5.3.130.0070.11746.30
5.3.120.0030.18746.24
5.3.110.0130.16746.17
5.3.100.0130.15745.87
5.3.90.0230.10746.58
5.3.80.0200.18045.71
5.3.70.0200.14745.68
5.3.60.0270.14045.69
5.3.50.0130.19345.65
5.3.40.0200.13045.64
5.3.30.0000.16045.67
5.3.20.0030.18045.31
5.3.10.0130.15045.32
5.3.00.0070.16745.39
5.2.170.0170.11742.55
5.2.160.0030.16741.05
5.2.150.0170.17041.11
5.2.140.0070.14341.20
5.2.130.0030.16741.02
5.2.120.0130.16041.21
5.2.110.0170.16041.15
5.2.100.0000.11741.16
5.2.90.0230.16341.23
5.2.80.0170.10341.21
5.2.70.0170.15042.00
5.2.60.0170.15741.94
5.2.50.0230.13740.18
5.2.40.0170.12340.01
5.2.30.0130.20740.15
5.2.20.0030.16040.03
5.2.10.0200.10739.99
5.2.00.0300.13739.91
5.1.60.0130.23750.03
5.1.50.0200.18350.20
5.1.40.0200.13750.02
5.1.30.0200.14750.54
5.1.20.0230.15750.46
5.1.10.0200.15750.10
5.1.00.0300.17350.24
5.0.50.0130.21048.71
5.0.40.0070.21748.64
5.0.30.0170.23748.25
5.0.20.0300.21348.48
5.0.10.0170.18048.39
5.0.00.0030.23048.41
4.4.90.0130.23045.98
4.4.80.0300.19346.02
4.4.70.0230.20345.97
4.4.60.0070.16745.95
4.4.50.0130.17046.04
4.4.40.0300.21345.99
4.4.30.0270.23345.99
4.4.20.0300.15346.04
4.4.10.0070.18345.96
4.4.00.0170.24345.96
4.3.110.0270.16045.83
4.3.100.0300.20745.91
4.3.90.0270.26745.95
4.3.80.0170.21345.96
4.3.70.0070.23745.91
4.3.60.0070.24345.89
4.3.50.0300.18345.90
4.3.40.0170.16745.98
4.3.30.0200.22344.73
4.3.20.0170.22744.64
4.3.10.0130.22044.59
4.3.00.0200.20744.59

preferences:
35.89 ms | 401 KiB | 5 Q