3v4l.org

run code in 300+ PHP versions simultaneously
<?php $word = "$1$s"; or $word = "$2$s" if(preg_match('/^\$[1-9]{1}\$s$/' ,$word)){ echo 'true'; } else { echo 'false'; }

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.290.0040.04712.50
5.4.280.0110.05112.36
5.4.270.0070.04212.36
5.4.260.0110.04712.36
5.4.250.0070.05112.36
5.4.240.0060.04312.36
5.4.230.0070.05012.35
5.4.220.0090.05112.35
5.4.210.0080.05512.35
5.4.200.0140.05612.35
5.4.190.0120.04512.35
5.4.180.0090.06512.35
5.4.170.0360.06012.36
5.4.160.0080.04012.35
5.4.150.0300.11812.35
5.4.140.0210.07912.04
5.4.130.0240.08412.02
5.4.120.0120.04911.99
5.4.110.0130.06111.98
5.4.100.0230.04811.98
5.4.90.0130.12011.98
5.4.80.0070.04511.98
5.4.70.0090.04611.98
5.4.60.0120.05011.98
5.4.50.0100.04511.98
5.4.40.0150.04811.97
5.4.30.0150.05411.96
5.4.20.0210.08311.96
5.4.10.0290.08611.96
5.4.00.0090.04611.46
5.3.280.0170.07512.71
5.3.270.0220.06612.72
5.3.260.0280.05512.71
5.3.250.0090.06012.71
5.3.240.0110.06812.72
5.3.230.0080.04412.70
5.3.220.0110.03912.68
5.3.210.0090.04512.68
5.3.200.0080.04312.68
5.3.190.0100.04312.68
5.3.180.0140.03712.68
5.3.170.0130.04412.67
5.3.160.0080.04412.67
5.3.150.0100.04512.68
5.3.140.0080.04512.66
5.3.130.0090.04512.65
5.3.120.0060.04912.66
5.3.110.0100.05112.66
5.3.100.0140.04212.12
5.3.90.0110.04612.08
5.3.80.0100.04912.07
5.3.70.0230.06912.07
5.3.60.0170.07912.06
5.3.50.0190.07012.00
5.3.40.0130.06612.00
5.3.30.0100.04811.94
5.3.20.0090.03611.70
5.3.10.0080.03911.67
5.3.00.0100.06111.66
5.2.170.0090.0449.15
5.2.160.0130.0579.15
5.2.150.0050.0589.15
5.2.140.0100.0479.15
5.2.130.0110.0439.11
5.2.120.0230.0799.10
5.2.110.0100.0409.11
5.2.100.0120.0719.11
5.2.90.0080.0369.11
5.2.80.0090.0399.11
5.2.70.0080.0329.11
5.2.60.0130.0469.06
5.2.50.0170.0669.04
5.2.40.0150.0549.00
5.2.30.0170.0478.99
5.2.20.0120.0528.97
5.2.10.0150.0478.90
5.2.00.0130.0488.76
5.1.60.0180.0528.04
5.1.50.0150.0568.04
5.1.40.0130.0748.03
5.1.30.0130.0398.38
5.1.20.0190.0568.39
5.1.10.0190.0688.12
5.1.00.0050.0378.13
5.0.50.0050.0366.60
5.0.40.0090.0366.46
5.0.30.0060.0476.27
5.0.20.0100.0396.24
5.0.10.0160.0596.22
5.0.00.0080.0426.21
4.4.90.0060.0224.78
4.4.80.0050.0254.75
4.4.70.0040.0224.75
4.4.60.0090.0214.75
4.4.50.0170.0454.77
4.4.40.0100.0464.71
4.4.30.0080.0354.75
4.4.20.0100.0334.84
4.4.10.0050.0254.85
4.4.00.0110.0444.76
4.3.110.0060.0274.67
4.3.100.0070.0274.67
4.3.90.0110.0284.64
4.3.80.0050.0354.58
4.3.70.0050.0224.63
4.3.60.0060.0234.63
4.3.50.0060.0254.63
4.3.40.0040.0334.54
4.3.30.0090.0183.27
4.3.20.0050.0243.25
4.3.10.0040.0223.22
4.3.00.0230.0238.11

preferences:
159.36 ms | 1394 KiB | 7 Q