3v4l.org

run code in 500+ PHP versions simultaneously
<?php $zip_codes = array( '12556', '765547', '234*', '987*', '237' ); $target_zip = '2347890'; foreach($zip_codes as $zip ) { $digitsOnly = preg_replace("~^(\d+)\**$~", "$1", $zip); if (strpos($target_zip, $digitsOnly) === 0) { echo "$zip matched $target_zip" . PHP_EOL; break; } else { echo "$zip not matched $target_zip" . PHP_EOL; } }

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.70.0110.00716.88
8.5.60.0110.00716.79
8.5.50.0040.00418.36
8.5.30.0130.00417.41
8.5.20.0090.00919.34
8.5.10.0090.00916.82
8.5.00.0130.01220.18
8.4.220.0120.00919.66
8.4.210.0120.00719.52
8.4.180.0100.01119.75
8.4.170.0120.00920.42
8.4.160.0140.01123.59
8.4.150.0040.00316.92
8.4.140.0110.01017.90
8.4.130.0060.00518.91
8.4.120.0060.00324.34
8.4.110.0040.00518.96
8.4.100.0070.00218.63
8.4.90.0130.00820.91
8.4.80.0050.00517.94
8.4.70.0120.00918.22
8.4.60.0100.01219.04
8.4.50.0070.01019.46
8.4.40.0100.01019.49
8.4.30.0060.01320.57
8.4.20.0100.00718.20
8.4.10.0040.00420.39
8.3.310.0090.00818.44
8.3.300.0130.00720.75
8.3.290.0100.01020.62
8.3.280.0110.00818.35
8.3.270.0100.01216.71
8.3.260.0130.00716.45
8.3.250.0120.00618.95
8.3.240.0060.00317.14
8.3.230.0090.01016.76
8.3.220.0030.00518.85
8.3.210.0120.00716.55
8.3.200.0050.00416.94
8.3.190.0110.00817.39
8.3.180.0080.01116.81
8.3.170.0030.01320.54
8.3.160.0120.00617.12
8.3.150.0040.01118.98
8.3.140.0070.01116.46
8.3.130.0060.00318.66
8.3.120.0000.00920.81
8.3.110.0060.00320.94
8.3.100.0140.00016.63
8.3.90.0040.00426.77
8.3.80.0040.00418.25
8.3.70.0100.01016.63
8.3.60.0130.00318.55
8.3.50.0120.00824.62
8.3.40.0140.00718.96
8.3.30.0120.00919.02
8.3.20.0000.00821.69
8.3.10.0040.00422.05
8.3.00.0060.00323.65
8.2.300.0120.01022.19
8.2.290.0110.01020.68
8.2.280.0060.00418.53
8.2.270.0140.00019.15
8.2.260.0140.00320.71
8.2.250.0120.00320.75
8.2.240.0090.00917.32
8.2.230.0000.01622.58
8.2.220.0090.00324.06
8.2.210.0070.01426.77
8.2.200.0060.00316.88
8.2.190.0100.01016.58
8.2.180.0130.00625.92
8.2.170.0040.01218.96
8.2.160.0050.01020.16
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0060.00320.52
8.2.100.0060.00617.97
8.2.90.0000.00917.75
8.2.80.0060.00319.04
8.2.70.0050.00317.80
8.2.60.0000.00718.22
8.2.50.0000.00719.21
8.2.40.0040.00419.33
8.2.30.0070.00019.37
8.2.20.0000.00818.14
8.2.10.0040.00419.27
8.2.00.0000.00719.31
8.1.340.0130.00617.88
8.1.330.0100.00822.09
8.1.320.0120.00716.46
8.1.310.0100.00716.71
8.1.300.0090.00016.29
8.1.290.0090.00030.84
8.1.280.0070.01425.92
8.1.270.0030.00622.52
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0100.00022.07
8.1.230.0100.00023.83
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0000.00917.50
8.1.180.0000.00818.84
8.1.170.0040.00418.69
8.1.160.0070.00019.11
8.1.150.0040.00418.82
8.1.140.0000.00818.95
8.1.130.0000.01020.06
8.1.120.0000.00717.52
8.1.110.0040.00417.57
8.1.100.0040.00417.59
8.1.90.0000.00817.61
8.1.80.0000.00717.59
8.1.70.0030.00317.42
8.1.60.0000.00817.74
8.1.50.0040.00417.66
8.1.40.0040.00417.66
8.1.30.0060.00317.69
8.1.20.0040.00417.85
8.1.10.0050.00317.57
8.1.00.0040.00417.65
8.0.300.0040.00418.77
8.0.290.0080.00016.88
8.0.280.0040.00418.50
8.0.270.0000.00717.00
8.0.260.0000.00718.47
8.0.250.0040.00417.11
8.0.240.0070.00017.11
8.0.230.0030.00317.02
8.0.220.0040.00417.05
8.0.210.0040.00417.05
8.0.200.0050.00216.98
8.0.190.0040.00417.15
8.0.180.0000.00817.09
8.0.170.0070.00317.02
8.0.160.0050.00317.15
8.0.150.0070.00017.08
8.0.140.0050.00216.98
8.0.130.0050.00013.43
8.0.120.0040.00417.02
8.0.110.0050.00216.93
8.0.100.0000.00716.98
8.0.90.0110.00016.91
8.0.80.0100.01017.00
8.0.70.0080.00016.85
8.0.60.0040.00417.06
8.0.50.0000.00817.05
8.0.30.0120.00317.50
8.0.20.0110.00717.51
8.0.10.0000.00817.09
8.0.00.0120.00917.13
7.4.330.0000.00515.55
7.4.320.0070.00016.73
7.4.300.0030.00316.82
7.4.290.0040.00416.80
7.4.280.0040.00416.75
7.4.270.0000.00716.68
7.4.260.0030.00316.72
7.4.250.0070.00016.66
7.4.240.0040.00416.68
7.4.230.0030.00316.80
7.4.220.0040.00416.57
7.4.210.0030.01516.79
7.4.200.0040.00416.71
7.4.130.0070.01116.54
7.4.120.0130.01016.62
7.4.110.0170.00016.74
7.4.100.0190.00616.67
7.4.90.0130.00616.55
7.4.80.0140.01119.39
7.4.70.0100.00616.77
7.4.60.0100.00716.70
7.4.50.0120.00616.70
7.4.40.0000.01716.63
7.4.30.0090.00816.68
7.4.20.0140.00416.75
7.4.10.0070.01116.68
7.4.00.0040.01216.66
7.3.330.0070.00016.48
7.3.320.0000.00613.27
7.3.310.0000.00716.46
7.3.300.0000.00716.50
7.3.290.0050.01316.45
7.3.260.0070.01016.42
7.3.240.0070.01016.62
7.3.230.0000.01716.74
7.3.210.0130.00316.70
7.3.200.0100.00616.68
7.3.190.0130.00316.76
7.3.180.0180.00016.49
7.3.170.0070.01416.70
7.3.160.0030.01316.79
7.3.150.0070.01016.45
7.3.140.0080.00816.30
7.3.130.0080.00816.45
7.3.120.0100.00716.61
7.3.110.0130.00316.40
7.3.100.0080.00816.38
7.3.90.0110.01116.85
7.3.80.0000.01716.57
7.3.70.0090.00916.50
7.3.60.0040.01216.45
7.3.50.0070.01016.51
7.3.40.0100.00616.45
7.3.30.0030.01316.41
7.3.20.0130.00316.50
7.3.10.0120.00616.59
7.3.00.0100.00616.50
7.2.330.0060.01716.73
7.2.320.0160.00616.78
7.2.310.0120.00916.74
7.2.300.0100.00716.70
7.2.290.0090.00916.87
7.2.280.0040.01616.80
7.2.270.0060.01216.79
7.2.260.0030.01316.87
7.2.250.0080.00816.85
7.2.240.0110.00616.73
7.2.230.0060.01217.00
7.2.220.0060.01116.84
7.2.210.0050.01116.91
7.2.200.0040.01416.60
7.2.190.0030.01316.70
7.2.180.0070.01016.71
7.2.170.0110.00616.76
7.2.160.0140.00316.71
7.2.150.0090.00916.89
7.2.140.0110.00916.80
7.2.130.0100.00716.90
7.2.120.0100.00716.86
7.2.110.0030.01316.91
7.2.100.0100.00716.88
7.2.90.0090.00916.89
7.2.80.0070.01016.82
7.2.70.0090.00616.76
7.2.60.0100.00716.73
7.2.50.0120.00616.84
7.2.40.0320.01316.84
7.2.30.0030.01216.77
7.2.20.0030.01816.73
7.2.10.0140.00316.81
7.2.00.0110.00716.69

preferences:
80.53 ms | 1513 KiB | 5 Q