3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/"\K[\w-]+(\.jpg)(?=")/'; $str = ';s:27:"2018/08/hello-there-003.jpg";s:5:"sizes";a:23:{s:9:"thumbnail";a:4:{s:4:"file";s:27:"hello-there-003-150x150.jpg";s:5:"width";i:150;s:6:"height";i:150;s:9:"mime-type";s:10:"image/jpeg";}s:6:"medium";a:4:{s:4:"file";s:27:"hello-there-003-300x200.jpg" '; $subst = 'replacement$1'; $result = preg_replace($re, $subst, $str); echo $result;

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.10.0100.00816.93
8.5.00.0120.01020.11
8.4.150.0020.00014.05
8.4.140.0130.00817.95
8.4.130.0090.01017.94
8.4.120.0110.00820.84
8.4.110.0130.00718.85
8.4.100.0070.00220.51
8.4.90.0140.00618.46
8.4.80.0130.00622.51
8.4.70.0100.00817.89
8.4.60.0050.00418.71
8.4.50.0130.00818.59
8.4.40.0170.00317.62
8.4.30.0110.00919.40
8.4.20.0130.00720.68
8.4.10.0100.01017.86
8.3.280.0130.00718.64
8.3.270.0100.01116.52
8.3.260.0060.00416.68
8.3.250.0070.00118.70
8.3.240.0120.00716.56
8.3.230.0110.00116.50
8.3.220.0050.00216.96
8.3.210.0080.01116.77
8.3.200.0070.00216.79
8.3.190.0080.01116.90
8.3.180.0120.00716.46
8.3.170.0040.01416.98
8.3.160.0110.00716.79
8.3.150.0070.01118.29
8.3.140.0040.00417.25
8.3.130.0060.00318.40
8.3.120.0090.00020.39
8.3.110.0040.00420.94
8.3.100.0060.00316.63
8.3.90.0080.00018.55
8.3.80.0030.00718.43
8.3.70.0110.01118.43
8.3.60.0100.00618.41
8.3.50.0190.00618.16
8.3.40.0070.00718.75
8.3.30.0140.00018.79
8.3.20.0040.00418.73
8.3.10.0080.00023.66
8.3.00.0050.00320.69
8.2.290.0120.00720.59
8.2.280.0100.00718.55
8.2.270.0060.00317.33
8.2.260.0060.00316.70
8.2.250.0030.00620.36
8.2.240.0080.00818.84
8.2.230.0030.00622.58
8.2.220.0000.00824.06
8.2.210.0100.00726.77
8.2.200.0060.00318.66
8.2.190.0090.00616.88
8.2.180.0040.01516.38
8.2.170.0100.01022.96
8.2.160.0160.00719.34
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0050.00319.89
8.2.110.0000.00922.26
8.2.100.0030.00917.77
8.2.90.0040.00418.09
8.2.80.0000.00817.97
8.2.70.0050.00317.80
8.2.60.0040.00418.03
8.2.50.0000.00918.10
8.2.40.0080.00019.41
8.2.30.0000.00719.25
8.2.20.0000.00817.94
8.2.10.0050.00218.09
8.2.00.0000.00817.72
8.1.330.0120.00722.05
8.1.320.0110.00818.16
8.1.310.0030.00518.68
8.1.300.0060.00320.06
8.1.290.0090.00318.88
8.1.280.0150.00425.92
8.1.270.0150.00024.66
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0060.00319.34
8.1.230.0180.00420.67
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0060.00617.48
8.1.190.0050.00317.23
8.1.180.0000.00818.10
8.1.170.0050.00318.62
8.1.160.0040.00418.89
8.1.150.0050.00318.73
8.1.140.0050.00323.95
8.1.130.0070.00020.04
8.1.120.0000.00717.56
8.1.110.0040.00417.53
8.1.100.0080.00017.42
8.1.90.0040.00417.55
8.1.80.0000.00717.43
8.1.70.0000.00717.42
8.1.60.0040.00717.71
8.1.50.0100.00017.59
8.1.40.0060.00317.62
8.1.30.0080.00317.66
8.1.20.0000.00817.66
8.1.10.0000.00817.70
8.1.00.0080.00017.59
8.0.300.0000.00919.85
8.0.290.0060.00316.88
8.0.280.0030.00318.41
8.0.270.0030.00317.14
8.0.260.0040.00420.18
8.0.250.0020.00517.09
8.0.240.0000.00817.08
8.0.230.0030.00517.00
8.0.220.0070.00016.86
8.0.210.0040.00416.98
8.0.200.0000.00817.09
8.0.190.0030.00517.03
8.0.180.0000.00816.88
8.0.170.0000.00817.03
8.0.160.0100.00016.86
8.0.150.0040.00416.98
8.0.140.0040.00416.91
8.0.130.0030.00313.42
8.0.120.0040.00416.96
8.0.110.0040.00416.79
8.0.100.0070.00017.00
8.0.90.0040.00416.86
8.0.80.0110.00816.92
8.0.70.0040.00416.77
8.0.60.0040.00416.85
8.0.50.0000.00717.01
8.0.30.0080.01017.14
8.0.20.0130.00917.43
8.0.10.0040.00417.09
8.0.00.0120.01016.95
7.4.330.0050.00015.55
7.4.320.0000.00716.66
7.4.300.0070.00016.73
7.4.290.0040.00416.70
7.4.280.0030.00516.70
7.4.270.0100.00016.78
7.4.260.0030.00316.58
7.4.250.0050.00316.71
7.4.240.0040.00416.66
7.4.230.0030.00316.72
7.4.220.0040.00416.52
7.4.210.0070.00916.75
7.4.200.0050.00216.86
7.4.160.0070.01116.64
7.4.140.0100.00817.86
7.4.130.0070.01116.74
7.4.120.0100.00916.61
7.4.110.0120.00616.69
7.4.100.0060.01216.71
7.4.90.0100.00716.61
7.4.80.0110.01119.39
7.4.70.0100.00716.49
7.4.60.0090.00616.55
7.4.50.0090.00916.78
7.4.40.0000.01816.74
7.4.00.0080.00814.95
7.3.330.0020.00213.14
7.3.320.0060.00013.18
7.3.310.0040.00416.50
7.3.300.0070.00016.39
7.3.290.0070.00016.39
7.3.280.0070.00816.29
7.3.260.0110.01216.65
7.3.240.0080.01016.44
7.3.230.0130.00416.56
7.3.210.0030.01316.55
7.3.200.0140.00416.31
7.3.190.0110.00616.32
7.3.180.0070.01016.63
7.3.170.0140.00616.60
7.3.160.0140.00916.82
7.3.120.0070.01014.73
7.3.110.0090.00614.87
7.3.100.0030.01214.88
7.3.90.0030.01014.69
7.3.80.0030.01414.52
7.3.70.0090.00314.85
7.3.60.0080.00814.89
7.3.50.0100.00714.95
7.3.40.0070.00714.97
7.3.30.0150.00014.77
7.3.20.0060.00316.75
7.3.10.0000.01316.58
7.3.00.0040.01116.99
7.2.330.0130.01016.69
7.2.320.0070.01016.87
7.2.310.0170.00016.91
7.2.300.0090.01216.80
7.2.290.0090.00616.66
7.2.250.0110.00715.22
7.2.240.0130.00715.00
7.2.230.0000.01015.23
7.2.220.0030.01015.34
7.2.210.0140.00415.14
7.2.200.0070.00715.09
7.2.190.0070.01015.11
7.2.180.0030.00915.09
7.2.170.0030.00615.14
7.2.110.1030.01014.31
7.2.100.0870.01014.46
7.2.90.0700.00914.72
7.2.80.0880.00614.85
7.2.70.0860.00314.82
7.2.60.1200.01015.00
7.2.50.0990.01014.57
7.2.40.1070.00914.91
7.2.30.0840.00915.21
7.2.20.0990.00314.88
7.2.10.1080.01314.96
7.2.00.0880.01015.21
7.1.330.0100.00316.04
7.1.320.0030.01016.16
7.1.310.0000.01016.03
7.1.300.0040.01115.99
7.1.290.0030.01315.58
7.1.280.0040.01215.68
7.1.270.0030.01215.91
7.1.260.0040.00415.85
7.1.230.1150.01013.61
7.1.220.0890.01314.17
7.1.210.0920.00714.14
7.1.200.1220.00613.91
7.1.190.1270.00313.73
7.1.180.0980.01313.95
7.1.170.0860.01313.96
7.1.160.1010.00614.16
7.1.150.1010.00613.75
7.1.140.0920.00713.72
7.1.130.1030.00014.03
7.1.120.0860.00913.95
7.1.110.0900.00313.91
7.1.100.0980.00913.71
7.1.90.0960.00613.78
7.1.80.1210.01014.00
7.1.70.1080.00313.88
7.1.60.1160.01031.86
7.1.50.1220.01731.92
7.1.40.1130.01032.06
7.1.30.1000.01032.05
7.1.20.1050.01032.09
7.1.10.0990.00913.79
7.1.00.1250.01014.13
5.6.380.0050.01114.07

preferences:
40.39 ms | 403 KiB | 5 Q