3v4l.org

run code in 200+ php & hhvm versions
<?php echo "---------------------password check----------------------- \n"; $str1="JamesBlunt32"; if(preg_match("/\A(?=\w{6,12}\z)(?=[^a-z]*[a-z])(?:[^A-Z]*[A-Z])(\D*\d.*)\z/", $str1)==1){ echo "Password valid \n"; } else echo "Password invalid \n";

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.60.0120.00317.01
7.2.00.0000.01019.19
7.1.200.0070.00415.92
7.1.70.0090.00617.18
7.1.60.0090.00617.11
7.1.00.0070.06722.37
7.0.200.0340.00715.00
7.0.100.0130.06019.93
7.0.90.0230.06720.01
7.0.80.0200.05720.12
7.0.70.0030.09020.20
7.0.60.0100.07020.03
7.0.50.0270.05020.33
7.0.40.0200.06320.32
7.0.30.0170.06020.40
7.0.20.0070.07720.37
7.0.10.0130.05720.32
7.0.00.0170.07720.27
5.6.250.0100.06020.68
5.6.240.0130.06720.85
5.6.230.0130.05320.78
5.6.220.0030.06720.64
5.6.210.0100.08720.68
5.6.200.0170.06721.09
5.6.190.0000.06721.08
5.6.180.0130.06021.06
5.6.170.0170.06321.16
5.6.160.0170.10021.08
5.6.150.0100.07721.02
5.6.140.0070.06321.07
5.6.130.0100.06721.16
5.6.120.0230.05321.08
5.6.110.0070.06721.11
5.6.100.0170.06021.12
5.6.90.0200.05321.12
5.6.80.0130.05320.46
5.6.70.0230.04720.39
5.6.60.0130.06720.51
5.6.50.0000.07320.49
5.6.40.0130.06020.45
5.6.30.0030.07320.43
5.6.20.0130.08320.45
5.6.10.0100.06320.37
5.6.00.0100.08320.51