3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'This is a string!'; var_dump(array_filter(str_split($string), function($val, $key) { return $key % 2; });;

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.310.0070.04512.52
5.4.300.0060.04512.52
5.4.290.0100.04312.51
5.4.280.0040.04812.41
5.4.270.0100.03412.41
5.4.260.0060.04012.41
5.4.250.0060.03912.41
5.4.240.0080.04112.41
5.4.230.0030.04412.40
5.4.220.0120.03312.40
5.4.210.0040.03612.40
5.4.200.0080.03912.40
5.4.190.0110.03412.39
5.4.180.0060.03912.39
5.4.170.0020.04012.41
5.4.160.0050.03912.40
5.4.150.0090.03812.39
5.4.140.0080.03912.09
5.4.130.0090.03212.07
5.4.120.0030.04812.04
5.4.110.0090.03812.04
5.4.100.0060.05012.03
5.4.90.0050.04012.03
5.4.80.0050.03812.03
5.4.70.0070.03312.02
5.4.60.0050.04212.03
5.4.50.0050.03712.03
5.4.40.0050.04212.02
5.4.30.0060.04112.02
5.4.20.0090.03212.01
5.4.10.0070.04912.01
5.4.00.0040.04211.50
5.3.290.0080.04312.80
5.3.280.0060.03812.70
5.3.270.0090.04612.72
5.3.260.0070.04512.72
5.3.250.0030.04112.72
5.3.240.0100.03812.72
5.3.230.0060.04612.71
5.3.220.0090.03712.68
5.3.210.0110.03812.68
5.3.200.0070.03812.68
5.3.190.0080.04312.68
5.3.180.0080.03812.67
5.3.170.0080.03812.67
5.3.160.0080.03512.68
5.3.150.0070.03612.67
5.3.140.0030.04212.66
5.3.130.0080.04812.66
5.3.120.0090.04712.66
5.3.110.0050.04812.66
5.3.100.0110.04112.12
5.3.90.0030.04212.10
5.3.80.0060.04512.09
5.3.70.0110.03412.10
5.3.60.0040.04412.08
5.3.50.0100.03612.02
5.3.40.0050.03912.02
5.3.30.0060.03911.98
5.3.20.0100.04111.77
5.3.10.0050.03711.73
5.3.00.0040.03911.72
5.2.170.0030.0339.18
5.2.160.0070.0319.18
5.2.150.0020.0379.18
5.2.140.0060.0369.18
5.2.130.0030.0399.14
5.2.120.0070.0309.14
5.2.110.0070.0319.14
5.2.100.0030.0309.14
5.2.90.0060.0269.14
5.2.80.0050.0379.13
5.2.70.0060.0319.14
5.2.60.0060.0319.09
5.2.50.0060.0429.06
5.2.40.0060.0319.04
5.2.30.0060.0359.02
5.2.20.0010.0329.00
5.2.10.0060.0268.93
5.2.00.0020.0318.78
5.1.60.0030.0258.07
5.1.50.0050.0258.07
5.1.40.0050.0298.05
5.1.30.0040.0278.40
5.1.20.0070.0288.42
5.1.10.0060.0418.14
5.1.00.0050.0338.14
5.0.50.0040.0246.62
5.0.40.0060.0236.48
5.0.30.0050.0316.29
5.0.20.0030.0246.27
5.0.10.0070.0256.24
5.0.00.0040.0406.23
4.4.90.0040.0174.78
4.4.80.0040.0184.75
4.4.70.0010.0214.75
4.4.60.0030.0184.75
4.4.50.0040.0234.77
4.4.40.0030.0264.71
4.4.30.0020.0164.76
4.4.20.0010.0194.84
4.4.10.0040.0164.85
4.4.00.0020.0284.75
4.3.110.0030.0274.67
4.3.100.0060.0174.66
4.3.90.0020.0194.64
4.3.80.0040.0274.58
4.3.70.0030.0144.63
4.3.60.0020.0184.63
4.3.50.0020.0214.63
4.3.40.0020.0294.54
4.3.30.0020.0223.28
4.3.20.0000.0293.26
4.3.10.0020.0223.22
4.3.00.0070.01315.92

preferences:
146.01 ms | 1394 KiB | 7 Q