3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'write {Hello, World!} in either the color {blue} or {red} or {#00AA00} and in either the font {Arial Black} or {Monaco} where both the color and the font are determined randomly'; var_export(preg_replace(['~{~', '~}~'], ['<strong>', '</strong'], preg_split('~({[^}]*}|\S+)\K ~', $text)));

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.0090.01120.58
8.4.110.0120.00922.52
8.4.100.0080.01318.48
8.4.90.0130.00718.82
8.4.80.0120.00920.10
8.4.70.0140.00819.77
8.4.60.0090.01318.76
8.4.50.0130.00820.40
8.4.40.0130.00719.65
8.4.30.0170.00320.29
8.4.20.0100.01020.52
8.4.10.0070.01417.96
8.3.250.0130.00518.56
8.3.240.0120.00716.93
8.3.230.0110.00816.54
8.3.220.0050.00318.70
8.3.210.0110.00816.76
8.3.200.0050.00416.81
8.3.190.0120.00816.94
8.3.180.0110.00716.45
8.3.170.0090.00916.52
8.3.160.0090.00917.11
8.3.150.0090.00016.57
8.3.140.0000.00819.02
8.3.130.0050.00516.91
8.3.120.0090.00920.52
8.3.110.0040.00720.94
8.3.100.0030.00624.06
8.3.90.0040.00426.77
8.3.80.0080.00418.30
8.3.70.0120.00616.50
8.3.60.0110.00718.40
8.3.50.0150.00518.16
8.3.40.0150.00018.70
8.3.30.0100.00618.55
8.3.20.0040.00420.57
8.3.10.0090.00023.49
8.3.00.0000.00823.63
8.2.290.0080.01120.30
8.2.280.0130.00718.48
8.2.270.0090.00916.90
8.2.260.0030.00518.62
8.2.250.0100.00317.10
8.2.240.0060.00319.07
8.2.230.0000.00922.58
8.2.220.0100.00637.54
8.2.210.0150.00026.77
8.2.200.0100.00016.63
8.2.190.0110.00716.63
8.2.180.0130.00318.29
8.2.170.0000.01422.96
8.2.160.0070.00722.21
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0090.00319.26
8.2.110.0030.00620.58
8.2.100.0060.00617.91
8.2.90.0000.00817.63
8.2.80.0040.00418.81
8.2.70.0030.00617.68
8.2.60.0000.00817.84
8.2.50.0000.00818.10
8.2.40.0050.00219.34
8.2.30.0040.00419.19
8.2.20.0050.00218.01
8.2.10.0080.00019.21
8.2.00.0070.00019.31
8.1.330.0080.00821.73
8.1.320.0130.00516.41
8.1.310.0000.00818.61
8.1.300.0160.00018.36
8.1.290.0090.00030.84
8.1.280.0090.00625.92
8.1.270.0050.00323.99
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0140.00722.03
8.1.230.0060.00617.83
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0000.00917.48
8.1.190.0050.00317.38
8.1.180.0030.00618.10
8.1.170.0040.00418.65
8.1.160.0040.00419.10
8.1.150.0000.00718.97
8.1.140.0000.00722.18
8.1.130.0040.00417.59
8.1.120.0070.00017.52
8.1.110.0000.00717.58
8.1.100.0040.00717.61
8.1.90.0030.00617.44
8.1.80.0000.00717.46
8.1.70.0000.00817.56
8.1.60.0040.00417.69
8.1.50.0030.00617.59
8.1.40.0040.00417.61
8.1.30.0000.00817.76
8.1.20.0000.00717.61
8.1.10.0030.00517.51
8.1.00.0030.00517.55
8.0.300.0070.00018.77
8.0.290.0060.00316.88
8.0.280.0070.00018.29
8.0.270.0070.00017.14
8.0.260.0030.00316.83
8.0.250.0000.00917.09
8.0.240.0070.00017.04
8.0.230.0050.00316.95
8.0.220.0000.00716.98
8.0.210.0000.00816.98
8.0.200.0000.00817.04
8.0.190.0000.00817.04
8.0.180.0000.00817.02
8.0.170.0030.00616.87
8.0.160.0040.00417.03
8.0.150.0030.00517.00
8.0.140.0070.00016.93
8.0.130.0000.00613.37
8.0.120.0000.00816.84
8.0.110.0000.00716.81
8.0.100.0000.00716.79
8.0.90.0040.00416.77
8.0.80.0000.01516.98
8.0.70.0040.00416.82
8.0.60.0000.00716.80
8.0.50.0040.00416.98
8.0.30.0070.01017.24
8.0.20.0110.00717.40
8.0.10.0040.00417.00
8.0.00.0120.00516.95
7.4.330.0020.00216.84
7.4.320.0000.00716.72
7.4.300.0030.00316.75
7.4.290.0040.00416.75
7.4.280.0050.00316.77
7.4.270.0000.00816.57
7.4.260.0030.00316.76
7.4.250.0030.00516.74
7.4.240.0070.00016.77
7.4.230.0070.00016.57
7.4.220.0040.00416.71
7.4.210.0010.01516.78
7.4.200.0030.00316.77
7.4.160.0120.00616.52
7.4.140.0150.00717.86
7.4.130.0120.00616.71
7.4.120.0060.01316.56
7.4.110.0100.00716.50
7.4.100.0030.01716.51
7.4.90.0120.00616.62
7.4.80.0100.00719.39
7.4.70.0140.00416.56
7.4.60.0100.01016.66
7.4.50.0120.00016.38
7.4.40.0110.00616.70
7.4.00.0030.01214.99
7.3.330.0000.00513.20
7.3.320.0000.00613.16
7.3.310.0040.00416.23
7.3.300.0000.00616.20
7.3.290.0000.00716.31
7.3.280.0060.01016.26
7.3.260.0090.00816.47
7.3.240.0090.01016.43
7.3.230.0110.00616.53
7.3.210.0170.00316.50
7.3.200.0140.00716.50
7.3.190.0100.01016.34
7.3.180.0120.00416.74
7.3.170.0030.01516.35
7.3.160.0110.01216.52
7.3.00.1350.01314.72
7.2.330.0080.01116.57
7.2.320.0060.01016.48
7.2.310.0070.01016.62
7.2.300.0070.01016.60
7.2.290.0060.01216.52
7.2.130.1900.00315.07
7.2.120.1800.01614.80
7.2.110.1850.01014.86
7.2.100.3320.00715.16
7.2.90.2580.00714.75
7.2.80.1870.00314.75
7.2.70.1540.01015.01
7.2.60.1580.01314.89
7.2.50.1850.00014.73
7.2.40.2030.00714.83
7.2.30.1910.00014.89
7.2.20.1490.01015.02
7.2.10.1810.00714.98
7.2.00.0240.01415.04
7.1.250.1440.00714.12
7.0.330.1530.00313.66
5.6.380.0080.00414.48

preferences:
16.83 ms | 403 KiB | 5 Q