3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timestart = microtime( true ); $class = 'css'; $item = array( 'foo', 'bar', 'baz' ); for($i=0;$i<1000000;$i++){ $str = sprintf( "<a class='button button-secondary%s' href='themes.php?page=%s'$></a>", $class, $item[2], $item[0] ); } $timeend = microtime( true ); $timetotal = $timeend - $timestart; $r = number_format( $timetotal, 3 ); echo $r;

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.2.00.0070.25319.54
7.1.70.0030.19716.91
7.1.60.0030.28119.34
7.1.50.0070.24116.74
7.1.00.0070.36722.48
7.0.200.0030.19816.70
7.0.140.0070.31322.04
7.0.60.0070.29719.96
7.0.50.0000.31317.80
7.0.40.0030.25320.40
7.0.30.0270.28320.02
7.0.20.0300.32320.18
7.0.10.0230.28720.12
7.0.00.0230.29320.13
5.6.280.0030.45720.92
5.6.210.0070.31320.54
5.6.200.0070.38018.16
5.6.190.0000.34720.33
5.6.180.0330.37020.33
5.6.170.0200.31320.59
5.6.160.0070.32320.41
5.6.150.0070.36718.23
5.6.140.0000.40318.12
5.6.130.0070.34018.25
5.6.120.0070.35020.89
5.6.110.0100.41020.97
5.6.100.0130.41021.10
5.6.90.0070.45321.00
5.6.80.0030.42020.37
5.6.70.3930.26320.37
5.5.350.0200.38720.41
5.5.340.0070.42318.02
5.5.330.0100.34320.14
5.5.320.0470.38320.36
5.5.310.0300.40020.37
5.5.300.0170.41318.00
5.5.290.0700.37018.02
5.5.280.0100.37320.88
5.5.270.0100.41020.67
5.5.260.0100.34020.84
5.5.250.0200.40320.68
5.5.240.0070.34720.29
5.4.450.4470.33719.09
5.4.440.4670.33719.13
5.4.430.0000.36319.45
5.4.420.0270.37019.10
5.4.410.0230.40319.28
5.4.400.0230.35718.80
5.4.390.0030.38019.21
5.4.380.0030.34018.91
5.4.370.0870.35719.20
5.4.360.0430.34019.06
5.4.350.0090.81711.98
5.4.340.0110.98711.98
5.4.320.0100.52312.46
5.4.310.0120.56612.46
5.4.300.0100.51012.46
5.4.290.0060.52712.45
5.4.280.0070.66012.36
5.4.270.0100.53612.36
5.4.260.0030.61512.36
5.4.250.0040.67012.36
5.4.240.0150.73812.36
5.4.230.0140.66712.34
5.4.220.0120.68612.35
5.4.210.0110.66612.34
5.4.200.0080.67312.35
5.4.190.0090.75812.34
5.4.180.0100.66212.34
5.4.170.0090.72912.35
5.4.160.0100.69912.35
5.4.150.0080.57512.35
5.4.140.0070.65812.03
5.4.130.0120.74712.02
5.4.120.0080.67511.98
5.4.110.0100.67511.97
5.4.100.0110.83011.97
5.4.90.0100.77111.97
5.4.80.0090.65911.97
5.4.70.0140.74211.96
5.4.60.0180.66911.96
5.4.50.0110.67511.96
5.4.40.0110.72511.96
5.4.30.0110.60211.95
5.4.20.0100.67111.96
5.4.10.0120.71611.96
5.4.00.0130.73211.45

preferences:
47.7 ms | 401 KiB | 5 Q