3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'ab';$start_time = microtime(true);for($i = 0; $i <= 1000000; $i++){ +$a;}echo '<br/>', microtime(true) - $start_time;$start_time1 = microtime(true);for($i = 0; $i <= 1000000; $i++){ (int) $a;}echo '<br/>', microtime(true) - $start_time1;

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.0040.01219.14
7.1.70.0050.00517.22
7.1.60.0070.01719.32
7.1.50.0190.01934.89
7.1.00.0070.07322.36
7.0.200.0060.04516.84
7.0.140.0030.14322.07
7.0.60.0030.13719.99
7.0.50.0070.09717.75
7.0.40.0030.08720.03
7.0.30.0530.13020.00
7.0.20.0270.13020.29
7.0.10.0130.07720.00
7.0.00.0030.11319.99
5.6.280.0000.22320.91
5.6.210.0030.11720.55
5.6.200.0030.13318.12
5.6.190.0100.17320.43
5.6.180.0470.14020.61
5.6.170.0370.16720.49
5.6.160.0170.17320.52
5.6.150.0030.19318.18
5.6.140.0000.12318.13
5.6.130.0100.11718.21
5.6.120.0100.17020.88
5.6.110.0130.18720.98
5.6.100.0070.15721.00
5.6.90.0070.18721.00
5.6.80.0070.15020.54
5.5.350.0170.18020.30
5.5.340.0100.15717.91
5.5.330.0100.17320.29
5.5.320.0300.13720.24
5.5.310.0270.17720.24
5.5.300.0200.18017.91
5.5.290.0100.17717.96
5.5.280.0070.12320.77
5.5.270.0130.17320.82
5.5.260.0070.18020.86
5.5.250.0070.15020.70
5.5.240.0200.16720.16
5.4.450.0370.15019.56
5.4.440.0300.11719.45
5.4.430.0430.15019.57
5.4.420.0330.12719.38
5.4.410.0400.15019.28
5.4.400.0300.14319.06
5.4.390.0300.13319.23
5.4.380.0330.15719.09
5.4.370.0470.15018.91
5.4.360.0400.13719.16
5.4.350.0500.15019.10
5.4.340.0500.15019.24
5.4.320.0500.15718.93
5.4.310.0500.15318.88
5.4.300.0370.11319.10
5.4.290.0500.11319.09
5.4.280.0530.15019.07
5.4.270.0370.12719.07
5.4.260.0500.15019.05
5.4.250.0370.12019.23
5.4.240.0500.15019.09
5.4.230.0570.14319.23
5.4.220.0430.16318.88
5.4.210.0470.15718.94
5.4.200.0500.15319.20
5.4.190.0470.13019.15
5.4.180.0470.16019.07
5.4.170.0470.13719.15
5.4.160.0300.14719.14
5.4.150.0370.11719.06
5.4.140.0430.14716.34
5.4.130.0470.14716.26
5.4.120.0400.15316.44
5.4.110.0530.11716.27
5.4.100.0500.14016.47
5.4.90.0400.16716.48
5.4.80.0400.13016.45
5.4.70.0430.15016.38
5.4.60.0300.12716.41
5.4.50.0470.14716.35
5.4.40.0430.14716.18
5.4.30.0430.16316.46
5.4.20.0470.14316.25
5.4.10.0370.11316.39
5.4.00.0430.15715.70
5.3.290.0400.18314.68
5.3.280.0500.16014.50
5.3.270.0300.14014.46
5.3.260.0370.14714.44
5.3.250.0500.18014.48
5.3.240.0470.18314.46
5.3.230.0470.19014.61
5.3.220.0400.20714.51
5.3.210.0470.18014.41
5.3.200.0430.16314.50
5.3.190.0470.19014.58
5.3.180.0370.14014.55
5.3.170.0400.17714.50
5.3.160.0430.18314.51
5.3.150.0500.18314.39
5.3.140.0330.15714.60
5.3.130.0500.17714.53
5.3.120.0470.17314.64
5.3.110.0300.14314.51
5.3.100.0600.17313.99
5.3.90.0430.16313.86
5.3.80.0400.18713.98
5.3.70.0570.17713.96
5.3.60.0500.16713.84
5.3.50.0270.19313.89
5.3.40.0330.16713.74
5.3.30.0430.16313.75
5.3.20.0370.18313.46
5.3.10.0330.14713.61
5.3.00.0430.18013.65
5.2.170.0230.15312.31
5.2.160.0300.20712.31
5.2.150.0330.18712.31
5.2.140.0270.15012.31
5.2.130.0370.18012.31
5.2.120.0230.19712.31
5.2.110.0330.20712.31
5.2.100.0600.14712.31
5.2.90.0400.20312.31
5.2.80.0370.18012.31
5.2.70.0300.16012.31
5.2.60.0370.20312.31
5.2.50.0400.19312.31
5.2.40.0200.17012.31
5.2.30.0200.20712.31
5.2.20.0330.18712.31
5.2.10.0300.18012.31
5.2.00.0200.17012.31
5.1.60.0230.17312.31
5.1.50.0200.22712.31
5.1.40.0230.19012.31
5.1.30.0270.18312.31
5.1.20.0230.21712.31
5.1.10.0230.18712.31
5.1.00.0300.21012.31
5.0.50.0170.40012.31
5.0.40.0100.36012.31
5.0.30.0130.35312.31
5.0.20.0100.35012.31
5.0.10.0230.32712.31
5.0.00.0100.36312.31
4.4.90.0100.36012.31
4.4.80.0130.33312.31
4.4.70.0100.34012.31
4.4.60.0130.33012.31
4.4.50.0230.33712.31
4.4.40.0170.33712.31
4.4.30.0170.34312.31
4.4.20.0130.29012.31
4.4.10.0200.33712.31
4.4.00.0170.33712.31
4.3.110.0130.33012.31
4.3.100.0130.28012.31
4.3.90.0170.32312.31
4.3.80.0170.34712.31
4.3.70.0100.31712.31
4.3.60.0130.28312.31
4.3.50.0100.28312.31
4.3.40.0130.28012.31
4.3.30.0030.28312.31
4.3.20.0030.27712.31
4.3.10.0030.29712.31
4.3.00.0070.28012.31

preferences:
36.53 ms | 401 KiB | 5 Q