3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "12example"; if (preg_match("/^[0-9]{2}/", $string)) { echo "The first two characters are numbers."; } else { echo "The first two characters are not numbers."; }

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)
8.5.00.0110.00919.96
8.4.150.0020.00114.05
8.4.140.0170.00617.49
8.4.130.0050.00518.15
8.4.120.0050.00424.02
8.4.110.0120.00518.87
8.4.100.0140.00717.94
8.4.90.0150.00617.96
8.4.80.0070.00417.75
8.4.70.0050.00517.73
8.4.60.0130.00718.88
8.4.50.0120.00719.76
8.4.40.0090.00619.43
8.4.30.0040.00420.74
8.4.20.0100.01019.68
8.4.10.0090.00023.92
8.3.280.0100.01018.70
8.3.270.0160.00816.81
8.3.260.0100.01016.54
8.3.250.0110.00718.75
8.3.240.0150.00516.77
8.3.230.0110.00916.54
8.3.220.0120.00716.57
8.3.210.0070.01416.73
8.3.200.0060.00316.72
8.3.190.0080.01117.00
8.3.180.0100.00916.51
8.3.170.0060.00317.26
8.3.160.0150.00616.87
8.3.150.0040.01518.85
8.3.140.0070.00020.55
8.3.130.0090.00918.25
8.3.120.0000.00919.05
8.3.110.0060.00320.94
8.3.100.0000.00824.06
8.3.90.0130.00716.63
8.3.80.0030.00618.68
8.3.70.0040.01216.50
8.3.60.0120.00618.15
8.3.50.0120.00316.73
8.3.40.0100.00323.61
8.3.30.0040.01118.89
8.3.20.0050.00224.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0150.00318.81
8.2.280.0050.00320.24
8.2.270.0060.01216.96
8.2.260.0090.00920.75
8.2.250.0040.00416.73
8.2.240.0060.00318.85
8.2.230.0070.01122.58
8.2.220.0000.00937.54
8.2.210.0040.01426.77
8.2.200.0000.01116.63
8.2.190.0140.00016.63
8.2.180.0120.00316.59
8.2.170.0070.00719.13
8.2.160.0170.00322.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00026.16
8.2.110.0100.00821.17
8.2.100.0170.00218.24
8.2.90.0060.00318.16
8.2.80.0030.00518.20
8.2.70.0040.00417.72
8.2.60.0040.00417.88
8.2.50.0060.00317.75
8.2.40.0040.00419.73
8.2.30.0000.00917.77
8.2.20.0060.00317.72
8.2.10.0130.00317.67
8.2.00.0160.00017.66
8.1.330.0130.00716.41
8.1.320.0080.01018.30
8.1.310.0130.00716.76
8.1.300.0100.01019.80
8.1.290.0080.00418.88
8.1.280.0140.00725.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0060.00328.09
8.1.240.0040.00422.49
8.1.230.0110.00021.07
8.1.220.0040.00717.74
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0000.00817.25
8.1.180.0000.00818.10
8.1.170.0040.00417.62
8.1.160.0060.01017.46
8.1.150.0140.00317.51
8.1.140.0130.00417.46
8.1.130.0060.01117.48
8.1.120.0090.00617.57
8.1.110.0140.00317.62
8.1.100.0110.00417.52
8.1.90.0160.00017.56
8.1.80.0070.00717.52
8.1.70.0060.00617.58
8.1.60.0070.00717.69
8.1.50.0150.00417.53
8.1.40.0090.00417.70
8.1.30.0070.00817.64
8.1.20.0170.00017.69
8.1.10.0100.00517.70
8.1.00.0150.00417.65
8.0.300.0000.00819.89
8.0.290.0040.00416.88
8.0.280.0150.00016.94
8.0.270.0120.00317.02
8.0.260.0140.00016.88
8.0.250.0100.00517.00
8.0.240.0040.01116.95
8.0.230.0110.00416.86
8.0.220.0090.00616.88
8.0.210.0120.00216.79
8.0.200.0080.00816.93
8.0.190.0080.00816.94
8.0.180.0140.00016.88
8.0.170.0080.00816.91
8.0.160.0030.01116.80
8.0.150.0090.00616.82
8.0.140.0120.00216.88
8.0.130.0100.00516.88
8.0.120.0070.00716.79
8.0.110.0120.00016.88
8.0.100.0050.00716.78
8.0.90.0040.00716.73
8.0.80.0080.00416.79
8.0.70.0060.00916.91
8.0.60.0080.00316.91
8.0.50.0000.01016.79
8.0.30.0120.00016.82
8.0.20.0090.00516.99
8.0.10.0110.00416.98

preferences:
111.93 ms | 403 KiB | 5 Q