3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string= '[mycode="gallery" type="single" id="1" data="only"]'; echo preg_replace_callback('/\[([^\]]+)\]/', function($match) { $string = preg_replace('/\h*mycode="([^"]+)"\h*/', '$1/mycode', $match[1]); $string = preg_replace('/\h*type="([^"]+)"\h*/', 'mycode_$1.php', $string); $string = preg_replace('/\h*id="([^"]+)"\h*/', '?id=$1', $string); $string = preg_replace('/\h*data="([^"]+)"\h*/', '&data=$1', $string); return $string; }, $string);

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.120.0100.00722.56
8.4.110.0120.00818.97
8.4.100.0140.00718.00
8.4.90.0110.00918.04
8.4.80.0140.00618.17
8.4.70.0090.01117.99
8.4.60.0160.00618.75
8.4.50.0120.00818.55
8.4.40.0130.00718.22
8.4.30.0100.00317.91
8.4.20.0070.00317.98
8.4.10.0040.00719.79
8.3.250.0110.00718.80
8.3.240.0080.01016.57
8.3.230.0130.00716.67
8.3.220.0060.00216.64
8.3.210.0120.00816.59
8.3.200.0050.00416.82
8.3.190.0110.00916.71
8.3.180.0110.00816.56
8.3.170.0070.01118.73
8.3.160.0080.00018.48
8.3.150.0110.00718.88
8.3.140.0120.00618.34
8.3.130.0040.00418.41
8.3.120.0090.00618.83
8.3.110.0030.00620.94
8.3.100.0000.00824.06
8.3.90.0130.00726.77
8.3.80.0070.00319.36
8.3.70.0070.01116.61
8.3.60.0060.00918.55
8.3.50.0090.01217.63
8.3.40.0030.01318.77
8.3.30.0130.00319.02
8.3.20.0000.00720.16
8.3.10.0000.00821.98
8.3.00.0080.00023.67
8.2.290.0100.00619.05
8.2.280.0060.00417.14
8.2.270.0090.00917.05
8.2.260.0110.00720.52
8.2.250.0000.00916.82
8.2.240.0030.00617.30
8.2.230.0080.00022.58
8.2.220.0070.00437.54
8.2.210.0090.00626.77
8.2.200.0060.00316.75
8.2.190.0080.00816.88
8.2.180.0100.00718.41
8.2.170.0120.00622.96
8.2.160.0150.00022.16
8.2.150.0020.00524.18
8.2.140.0080.00024.66
8.2.130.0040.00422.39
8.2.120.0040.00426.35
8.2.110.0000.01020.38
8.2.100.0110.00017.91
8.2.90.0000.00818.16
8.2.80.0040.00418.09
8.2.70.0000.00817.72
8.2.60.0070.00317.75
8.2.50.0030.00618.10
8.2.40.0040.00419.28
8.2.30.0070.00019.26
8.2.20.0070.00018.18
8.2.10.0000.00718.09
8.2.00.0040.00418.16
8.1.330.0130.00618.17
8.1.320.0110.01015.98
8.1.310.0080.00018.71
8.1.300.0040.01518.30
8.1.290.0100.00018.88
8.1.280.0110.00425.92
8.1.270.0030.00620.64
8.1.260.0040.01126.35
8.1.250.0080.00028.09
8.1.240.0060.00322.07
8.1.230.0090.00323.86
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0060.00317.35
8.1.180.0000.00818.10
8.1.170.0030.00620.62
8.1.160.0030.00618.87
8.1.150.0040.00420.11
8.1.140.0040.00417.73
8.1.130.0030.00318.91
8.1.120.0000.00717.52
8.1.110.0000.00817.62
8.1.100.0000.00717.66
8.1.90.0000.01017.61
8.1.80.0040.00417.52
8.1.70.0000.00717.52
8.1.60.0000.00917.71
8.1.50.0030.00517.65
8.1.40.0030.00517.69
8.1.30.0060.00317.65
8.1.20.0040.00417.80
8.1.10.0040.00417.77
8.1.00.0040.00417.71
8.0.300.0000.00719.95
8.0.290.0000.00716.75
8.0.280.0050.00218.36
8.0.270.0000.00716.90
8.0.260.0040.00418.48
8.0.250.0060.00317.07
8.0.240.0040.00417.00
8.0.230.0070.00317.04
8.0.220.0000.00816.95
8.0.210.0000.00716.92
8.0.200.0070.00017.05
8.0.190.0040.00416.98
8.0.180.0070.00017.02
8.0.170.0000.00817.07
8.0.160.0060.00317.12
8.0.150.0040.00417.00
8.0.140.0050.00316.98
8.0.130.0030.00613.47
8.0.120.0040.00416.92
8.0.110.0040.00417.04
8.0.100.0040.00417.00
8.0.90.0040.00416.89
8.0.80.0060.00916.99
8.0.70.0000.00817.16
8.0.60.0050.00316.95
8.0.50.0000.00816.96
8.0.30.0150.00517.22
8.0.20.0090.00917.45
8.0.10.0000.00817.06
8.0.00.0030.01416.76
7.4.330.0030.00315.55
7.4.320.0030.00316.68
7.4.300.0030.00316.58
7.4.290.0030.00316.82
7.4.280.0060.00316.71
7.4.270.0000.00716.73
7.4.260.0030.00316.74
7.4.250.0040.00416.59
7.4.240.0040.00416.82
7.4.230.0050.00216.85
7.4.220.0090.01916.61
7.4.210.0060.00916.78
7.4.200.0040.00416.81
7.4.160.0060.01116.79
7.4.150.0100.01417.40
7.4.140.0130.00617.86
7.4.130.0120.01216.81
7.4.120.0070.01116.74
7.4.110.0050.01416.70
7.4.100.0120.00616.60
7.4.90.0140.00316.68
7.4.80.0030.01319.39
7.4.70.0150.00316.92
7.4.60.0060.01516.68
7.4.50.0080.01116.60
7.4.40.0110.00616.66
7.4.30.0040.01216.70
7.4.00.0040.01115.11
7.3.330.0000.00613.43
7.3.320.0050.00313.48
7.3.310.0050.00216.50
7.3.300.0040.00416.34
7.3.290.0080.01016.39
7.3.280.0080.00816.38
7.3.270.0140.01117.40
7.3.260.0080.01116.52
7.3.250.0100.00816.52
7.3.240.0100.00716.67
7.3.230.0060.01016.70
7.3.210.0040.01316.40
7.3.200.0070.01016.49
7.3.190.0090.00616.67
7.3.180.0080.00816.49
7.3.170.0100.00616.72
7.3.160.0100.00616.49
7.2.330.0150.00316.78
7.2.320.0070.01016.61
7.2.310.0030.01416.74
7.2.300.0130.00416.76
7.2.290.0100.00716.70
7.2.60.0060.00317.00
7.1.200.0000.00715.65
7.1.100.4410.01716.75
7.1.90.3100.01016.41
7.1.80.2580.01016.38
7.1.70.2890.00615.53
7.1.60.3440.01033.20
7.1.50.2960.01333.11
7.1.40.0130.01734.69
7.1.30.0210.01534.79
7.1.20.0250.00734.94
7.1.10.0030.01416.74
7.1.00.0030.01516.88
7.0.240.3570.01016.20
7.0.230.2590.01316.18
7.0.220.2260.00715.99
7.0.210.2830.01315.10
7.0.200.3150.00714.89
7.0.190.0290.01016.75
7.0.180.0060.00916.42
7.0.170.0070.01016.30
7.0.160.0000.01516.60
7.0.150.0080.00816.34
7.0.140.0080.00816.54
7.0.130.0070.00716.58
7.0.120.0090.00616.83
7.0.110.0090.00616.55
7.0.100.0030.01216.60
7.0.90.0030.01016.35
7.0.80.0000.01416.55
7.0.70.0060.00616.31
7.0.60.0060.00816.30
7.0.50.0100.00916.55
7.0.40.0030.01216.83
7.0.30.0040.01816.66
7.0.20.0090.00616.43
7.0.10.0070.01016.56
7.0.00.0040.01116.77

preferences:
25.36 ms | 403 KiB | 5 Q