3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array('pear', 'apple'), array('banana', 'coconut'), 'orange' // This is not an array element ); foreach($array as $value) {     if (is_array($value)) { /*         foreach($value as $fruit) {             echo $fruit . "<br>";         }*/     }     else {         echo $value . "<br>";     } }

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)
5.4.320.0300.03319.31
5.4.310.0370.06319.16
5.4.300.0370.06718.85
5.4.290.0270.07018.99
5.4.280.0330.06319.00
5.4.270.0330.06719.24
5.4.260.0270.06319.16
5.4.250.0300.07019.19
5.4.240.0330.06018.98
5.4.230.0330.07018.85
5.4.220.0300.04019.06
5.4.210.0300.06718.98
5.4.200.0470.04719.05
5.4.190.0300.07019.05
5.4.180.0330.06319.21
5.4.170.0330.06718.98
5.4.160.0270.03718.85
5.4.150.0330.07018.97
5.4.140.0300.06016.52
5.4.130.0230.07716.50
5.4.120.0230.04016.35
5.4.110.0270.03316.57
5.4.100.0400.05716.37
5.4.90.0200.04316.37
5.4.80.0200.06016.25
5.4.70.0370.06316.53
5.4.60.0330.06016.35
5.4.50.0300.07016.44
5.4.40.0300.06716.21
5.4.30.0330.06716.16
5.4.20.0270.05316.34
5.4.10.0300.03316.43
5.4.00.0200.04015.75
5.3.290.0230.05314.54
5.3.280.0270.05014.52
5.3.270.0370.07014.45
5.3.260.0370.06314.56
5.3.250.0230.05314.70
5.3.240.0230.07314.56
5.3.230.0230.07314.46
5.3.220.0230.06314.66
5.3.210.0300.05014.60
5.3.200.0270.07714.59
5.3.190.0200.03714.50
5.3.180.0300.06314.41
5.3.170.0270.05014.40
5.3.160.0400.06014.42
5.3.150.0300.07314.47
5.3.140.0300.05714.59
5.3.130.0270.06714.39
5.3.120.0230.04314.50
5.3.110.0330.06314.43
5.3.100.0270.07313.87
5.3.90.0270.03314.07
5.3.80.0430.05713.97
5.3.70.0230.03713.86
5.3.60.0270.07713.94
5.3.50.0330.05713.82
5.3.40.0300.06713.93
5.3.30.0270.05313.70
5.3.20.0330.05713.60
5.3.10.0300.06713.45
5.3.00.0330.06313.59
5.2.170.0170.03712.39
5.2.160.0300.05312.39
5.2.150.0300.04312.39
5.2.140.0330.03012.39
5.2.130.0330.04012.39
5.2.120.0230.06012.39
5.2.110.0200.05012.39
5.2.100.0270.04012.39
5.2.90.0330.04712.39
5.2.80.0270.05712.39
5.2.70.0170.05012.39
5.2.60.0330.05312.39
5.2.50.0230.04012.39
5.2.40.0200.05712.39
5.2.30.0170.05712.39
5.2.20.0230.05312.39
5.2.10.0270.05012.39
5.2.00.0200.03712.39
5.1.60.0170.04312.39
5.1.50.0370.04312.39
5.1.40.0230.03012.39
5.1.30.0200.04312.39
5.1.20.0270.04712.39
5.1.10.0230.05312.39
5.1.00.0170.05012.39
5.0.50.0100.04012.39
5.0.40.0130.04012.39
5.0.30.0130.04312.39
5.0.20.0100.04312.39
5.0.10.0170.03312.39
5.0.00.0100.05712.39
4.4.90.0170.02712.39
4.4.80.0170.02712.39
4.4.70.0170.02712.39
4.4.60.0130.03012.39
4.4.50.0070.03012.39
4.4.40.0170.04712.39
4.4.30.0100.03712.39
4.4.20.0130.03012.39
4.4.10.0070.03012.39
4.4.00.0070.03712.39
4.3.110.0130.03012.39
4.3.100.0070.02012.39
4.3.90.0170.02712.39
4.3.80.0070.03012.39
4.3.70.0100.02312.39
4.3.60.0100.01312.39
4.3.50.0070.04012.39
4.3.40.0100.03712.39
4.3.30.0030.03312.39
4.3.20.0030.04012.39
4.3.10.0070.03012.39
4.3.00.0070.03312.39

preferences:
139.19 ms | 1394 KiB | 7 Q