3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "This is one string with this picture pic1.jpg and here there's another one pic2.png for example"; $pat = '/\w+\d\.[a-zA-Z]{3}/'; $arrImg = null; if (preg_match_all( $pat, $str, $matches, PREG_PATTERN_ORDER )) { $arrImg = array_pop($matches); print_r($arrImg); } else { echo "no matches"; }

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.4.140.0120.00817.73
8.4.130.0090.00918.08
8.4.120.0090.00822.55
8.4.110.0120.00818.70
8.4.100.0110.01017.91
8.4.90.0090.00720.53
8.4.80.0110.00918.97
8.4.70.0120.00518.82
8.4.60.0090.00822.52
8.4.50.0140.00718.36
8.4.40.0040.00424.01
8.4.30.0100.01019.46
8.4.20.0060.00317.54
8.4.10.0100.00019.63
8.3.270.0130.00716.77
8.3.260.0060.00216.79
8.3.250.0110.00818.94
8.3.240.0130.00616.58
8.3.230.0120.00916.67
8.3.220.0100.00818.82
8.3.210.0100.00918.46
8.3.200.0050.00416.94
8.3.190.0160.00416.79
8.3.180.0110.00818.62
8.3.170.0150.00416.91
8.3.160.0060.01218.70
8.3.150.0150.00318.70
8.3.140.0060.01216.67
8.3.130.0040.00418.49
8.3.120.0080.00018.75
8.3.110.0030.00616.86
8.3.100.0060.00320.07
8.3.90.0060.00316.50
8.3.80.0000.00816.63
8.3.70.0040.01216.50
8.3.60.0160.00616.75
8.3.50.0110.00517.46
8.3.40.0060.00918.96
8.3.30.0070.00718.58
8.3.20.0080.00020.36
8.3.10.0040.00421.90
8.3.00.0040.00417.79
8.2.290.0130.00716.66
8.2.280.0160.00418.39
8.2.270.0130.00619.12
8.2.260.0070.01016.69
8.2.250.0090.00017.07
8.2.240.0030.00616.55
8.2.230.0060.00320.94
8.2.220.0080.00024.06
8.2.210.0040.00426.77
8.2.200.0060.00316.88
8.2.190.0070.01116.63
8.2.180.0110.00816.75
8.2.170.0110.00422.96
8.2.160.0110.00419.07
8.2.150.0000.00824.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0090.00319.19
8.2.110.0030.00721.00
8.2.100.0000.01217.78
8.2.90.0030.00619.64
8.2.80.0040.00420.35
8.2.70.0040.00417.63
8.2.60.0050.00317.75
8.2.50.0090.00017.91
8.2.40.0000.00817.91
8.2.30.0000.00719.21
8.2.20.0050.00217.94
8.2.10.0000.00818.07
8.2.00.0040.00418.07
8.1.330.0150.00316.55
8.1.320.0150.00416.31
8.1.310.0070.01018.30
8.1.300.0100.00518.18
8.1.290.0030.00718.88
8.1.280.0140.00725.92
8.1.270.0040.00424.66
8.1.260.0030.00526.35
8.1.250.0060.00328.09
8.1.240.0000.00922.19
8.1.230.0000.01122.65
8.1.220.0000.00817.74
8.1.210.0000.00818.85
8.1.200.0030.00617.35
8.1.190.0080.00017.36
8.1.180.0000.00818.10
8.1.170.0040.00417.62
8.1.160.0040.00419.01
8.1.150.0070.00018.73
8.1.140.0030.00519.46
8.1.130.0000.00718.86
8.1.120.0050.00317.61
8.1.110.0000.00817.53
8.1.100.0060.00317.54
8.1.90.0000.00817.45
8.1.80.0030.00317.45
8.1.70.0000.00717.57
8.1.60.0030.00617.68
8.1.50.0040.00417.62
8.1.40.0030.00517.59
8.1.30.0000.00817.61
8.1.20.0050.00317.71
8.1.10.0000.00717.53
8.1.00.0000.00817.65
8.0.300.0080.00020.10
8.0.290.0050.00516.75
8.0.280.0000.00718.46
8.0.270.0070.00017.13
8.0.260.0030.00317.22
8.0.250.0000.00716.92
8.0.240.0080.00017.05
8.0.230.0070.00016.94
8.0.220.0000.00716.99
8.0.210.0040.00417.02
8.0.200.0030.00316.91
8.0.190.0000.00816.98
8.0.180.0040.00416.98
8.0.170.0000.00717.01
8.0.160.0080.00017.07
8.0.150.0000.00816.97
8.0.140.0060.00316.90
8.0.130.0030.00313.38
8.0.120.0000.00716.83
8.0.110.0000.00716.77
8.0.100.0000.00716.96
8.0.90.0070.00016.87
8.0.80.0040.01116.96
8.0.70.0040.00417.04
8.0.60.0040.00416.78
8.0.50.0040.00416.91
8.0.30.0050.01217.10
8.0.20.0130.00517.43
8.0.10.0000.00717.14
8.0.00.0070.01316.89
7.4.330.0000.00515.55
7.4.320.0030.00316.73
7.4.300.0050.00216.74
7.4.290.0040.00416.54
7.4.280.0040.00416.59
7.4.270.0030.00316.77
7.4.260.0040.00416.57
7.4.250.0000.00816.75
7.4.240.0040.00416.71
7.4.230.0000.00716.73
7.4.220.0080.01716.71
7.4.210.0100.00916.80
7.4.200.0000.00716.77
7.4.160.0110.00516.90
7.4.150.0090.00917.40
7.4.140.0090.00717.86
7.4.130.0100.01016.70
7.4.120.0080.01216.69
7.4.110.0100.00716.54
7.4.100.0060.01316.55
7.4.90.0120.00816.62
7.4.80.0150.00619.39
7.4.70.0070.01016.55
7.4.60.0090.00616.63
7.4.50.0060.00916.43
7.4.40.0060.01216.50
7.4.30.0060.01016.72
7.4.00.0060.01115.13
7.3.330.0000.00513.12
7.3.320.0060.00313.02
7.3.310.0000.00716.43
7.3.300.0040.00416.32
7.3.290.0040.00416.13
7.3.280.0060.01216.29
7.3.270.0030.01317.40
7.3.260.0100.00616.31
7.3.250.0110.00716.51
7.3.240.0120.00816.36
7.3.230.0070.01016.30
7.3.210.0040.01216.37
7.3.200.0030.01516.59
7.3.190.0060.01016.75
7.3.180.0030.01316.52
7.3.170.0090.00616.70
7.3.160.0090.00916.34
7.3.120.0100.00814.85
7.3.110.0100.00714.75
7.3.100.0080.00614.68
7.3.90.0080.00814.81
7.3.80.0070.00514.85
7.3.70.0060.00914.82
7.3.60.0030.01014.76
7.3.50.0070.00914.91
7.3.40.0050.01214.82
7.3.30.0070.00514.88
7.3.20.0090.00616.61
7.3.10.0030.01016.63
7.3.00.0090.00716.66
7.2.330.0200.00616.74
7.2.320.0100.00716.51
7.2.310.0060.01216.69
7.2.300.0090.01416.61
7.2.290.0060.01216.53
7.2.250.0060.01215.16
7.2.240.0100.00914.91
7.2.230.0030.01315.16
7.2.220.0050.00515.12
7.2.210.0080.00814.96
7.2.200.0060.00814.94
7.2.190.0040.01115.16
7.2.180.0050.00914.91
7.2.170.0020.01215.00
7.2.160.0100.00715.24
7.2.150.0070.01016.96
7.2.140.0060.00616.97
7.2.130.0110.00516.99
7.2.120.0090.00616.88
7.2.110.0020.01116.88
7.2.100.0020.01017.06
7.2.90.0040.00916.96
7.2.80.0080.00616.74
7.2.70.0050.00716.96
7.2.60.0050.00916.79
7.2.50.0050.00916.91
7.2.40.0060.00916.91
7.2.30.0070.00816.86
7.2.20.0050.00916.81
7.2.10.0040.00816.88
7.2.00.0050.00716.98
7.1.330.0030.00916.05
7.1.320.0050.00815.85
7.1.310.0050.00715.96
7.1.300.0070.00715.77
7.1.290.0040.00915.85
7.1.280.0030.01015.90
7.1.270.0040.01215.87
7.1.260.0070.00715.90
7.1.250.0060.00715.85
7.1.200.0060.00316.07
7.1.70.0250.00715.52
7.1.60.0400.00933.36
7.1.50.0340.01432.89
7.1.40.0290.01632.80
7.1.30.0320.01832.95
7.1.20.0380.02632.99
7.1.10.0330.00614.89
7.1.00.0260.00614.73
7.0.200.0190.01215.13
7.0.190.0220.01315.05
7.0.180.0290.01114.76
7.0.170.0270.00514.76
7.0.160.0260.00914.71
7.0.150.0320.00514.46
7.0.140.0330.00614.64
7.0.130.0240.00714.75
7.0.120.0140.01414.67
7.0.110.0270.01314.64
7.0.100.0290.01114.61
7.0.90.0280.01114.50
7.0.80.0280.01114.76
7.0.70.0380.00514.50
7.0.60.0860.01314.48
7.0.50.0210.01014.39
7.0.40.0220.01114.97
7.0.30.0200.01814.68
7.0.20.0200.00814.90
7.0.10.0200.01114.70
7.0.00.0180.01414.59

preferences:
129.59 ms | 403 KiB | 5 Q