3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inStr = 'Hey you guys'; $tokens = array(); for(explode(' ',$inStr) as $bigToken)) : $tokens[] = $bigToken; //take care of individual words $tokens = array_merge($tokens, str_split($bigToken)); //take care of single letters for($i = 2; $i < strlen($bigToken); $i++) : $tokens[] = pop(str_split($bigToken)); //only need the first element here. endfor; endfor; print_r($tokens);

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.120.0130.03811.99
5.4.110.0120.04011.98
5.4.100.0170.05511.98
5.4.90.0110.04211.98
5.4.80.0100.04211.99
5.4.70.0100.04011.98
5.4.60.0190.05211.98
5.4.50.0160.04711.98
5.4.40.0120.03911.96
5.4.30.0120.04011.96
5.4.20.0120.04011.96
5.4.10.0110.04011.96
5.4.00.0120.03911.45
5.3.220.0100.04312.68
5.3.210.0180.04612.68
5.3.200.0140.04012.68
5.3.190.0120.04212.68
5.3.180.0150.06012.67
5.3.170.0100.04412.67
5.3.160.0180.05112.67
5.3.150.0120.04612.67
5.3.140.0120.04712.66
5.3.130.0120.04712.66
5.3.120.0120.04812.66
5.3.110.0220.06012.66
5.3.100.0140.04612.12
5.3.90.0120.04412.08
5.3.80.0190.06212.07
5.3.70.0140.04412.07
5.3.60.0130.04612.07
5.3.50.0140.04312.00
5.3.40.0160.06112.00
5.3.30.0140.04711.94
5.3.20.0110.04511.71
5.3.10.0170.04811.67
5.3.00.0180.05611.65
5.2.170.0090.0369.16
5.2.160.0110.0309.16
5.2.150.0110.0529.16
5.2.140.0100.0339.15
5.2.130.0130.0319.12
5.2.120.0100.0329.11
5.2.110.0090.0349.12
5.2.100.0090.0339.12
5.2.90.0110.0309.11
5.2.80.0100.0339.11
5.2.70.0120.0429.11
5.2.60.0120.0329.06
5.2.50.0150.0529.03
5.2.40.0100.0339.01
5.2.30.0090.0338.98
5.2.20.0080.0358.98
5.2.10.0130.0428.90
5.2.00.0160.0488.76
5.1.60.0090.0298.04
5.1.50.0080.0298.04
5.1.40.0100.0278.03
5.1.30.0080.0328.37
5.1.20.0080.0318.41
5.1.10.0120.0488.12
5.1.00.0070.0308.12
5.0.50.0080.0226.59
5.0.40.0060.0236.46
5.0.30.0100.0526.27
5.0.20.0070.0236.24
5.0.10.0090.0216.22
5.0.00.0100.0436.21
4.4.90.0070.0184.78
4.4.80.0110.0344.75
4.4.70.0060.0214.76
4.4.60.0030.0224.75
4.4.50.0070.0184.77
4.4.40.0060.0304.71
4.4.30.0060.0194.76
4.4.20.0060.0194.84
4.4.10.0060.0194.85
4.4.00.0050.0304.76
4.3.110.0050.0204.67
4.3.100.0050.0184.66
4.3.90.0060.0164.63
4.3.80.0050.0274.58
4.3.70.0050.0174.63
4.3.60.0040.0194.63
4.3.50.0050.0164.63
4.3.40.0050.0264.54
4.3.30.0040.0183.30
4.3.20.0030.0183.28
4.3.10.0050.0163.24
4.3.00.0030.0207.79

preferences:
138.6 ms | 1394 KiB | 7 Q