3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Some text {spoiler}He <span class="just_testing">dies</span> in the end{/spoiler} but {spoiler}not before becoming a Jedi{/spoiler}'; echo preg_replace_callback('~{spoiler}(.*?)({/spoiler})~s', function($m) { return '<span class="spoiler">' . preg_replace('~</?span[^>]*>~i', '', $m[1]) . '</span>'; }, $string, -1, $count); echo "\n---\n"; echo $count;

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.3.60.0140.00718.59
8.3.50.0090.00616.63
8.3.40.0150.00319.04
8.3.30.0100.01018.84
8.3.20.0000.00821.08
8.3.10.0040.00421.91
8.3.00.0060.00321.64
8.2.180.0130.00316.63
8.2.170.0040.01122.96
8.2.160.0070.00722.00
8.2.150.0000.00825.66
8.2.140.0060.00324.66
8.2.130.0080.00626.16
8.2.120.0070.00020.08
8.2.110.0000.01021.22
8.2.100.0090.00318.03
8.2.90.0040.00419.25
8.2.80.0040.00417.97
8.2.70.0050.00317.75
8.2.60.0000.00917.75
8.2.50.0030.00617.75
8.2.40.0040.00419.73
8.2.30.0000.00819.22
8.2.20.0040.00418.04
8.2.10.0050.00218.15
8.2.00.0000.00819.44
8.1.280.0030.01325.92
8.1.270.0160.00322.11
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00621.32
8.1.230.0090.00317.82
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0060.00617.21
8.1.190.0040.00417.48
8.1.180.0040.00418.10
8.1.170.0000.00817.65
8.1.160.0070.00018.97
8.1.150.0040.00418.96
8.1.140.0040.00422.22
8.1.130.0040.00417.60
8.1.120.0020.00517.54
8.1.110.0040.00417.55
8.1.100.0030.00717.61
8.1.90.0080.00017.52
8.1.80.0000.01017.57
8.1.70.0000.00717.51
8.1.60.0080.00017.75
8.1.50.0000.00817.67
8.1.40.0040.00417.68
8.1.30.0000.00817.71
8.1.20.0040.00417.75
8.1.10.0040.00417.66
8.1.00.0030.00517.66
8.0.300.0050.00318.77
8.0.290.0070.00016.88
8.0.280.0030.00518.46
8.0.270.0070.00017.22
8.0.260.0000.00816.97
8.0.250.0030.00317.00
8.0.240.0030.00317.12
8.0.230.0070.00017.00
8.0.220.0000.00717.06
8.0.210.0030.00517.03
8.0.200.0000.00616.96
8.0.190.0000.00817.11
8.0.180.0040.00416.96
8.0.170.0030.00616.98
8.0.160.0080.00017.00
8.0.150.0000.00816.86
8.0.140.0050.00216.96
8.0.130.0030.00313.46
8.0.120.0080.00017.07
8.0.110.0000.00716.93
8.0.100.0000.00816.82
8.0.90.0000.00817.05
8.0.80.0110.00517.06
8.0.70.0000.00717.07
8.0.60.0040.00417.06
8.0.50.0040.00417.07
8.0.30.0030.01816.97
8.0.20.0120.00917.40
8.0.10.0090.00017.04
8.0.00.0090.00916.91
7.4.330.0000.00516.84
7.4.320.0000.00716.79
7.4.300.0000.00716.77
7.4.290.0030.00316.80
7.4.280.0040.00416.72
7.4.270.0050.00316.73
7.4.260.0030.00316.78
7.4.250.0070.00016.77
7.4.240.0040.00416.74
7.4.230.0000.00816.89
7.4.220.0040.00416.61
7.4.210.0130.00216.81
7.4.200.0000.00716.93
7.4.160.0110.00416.71
7.4.140.0130.00817.86
7.4.130.0100.00716.60
7.4.120.0100.00916.75
7.4.110.0170.00016.63
7.4.100.0060.01216.74
7.4.90.0070.01016.61
7.4.80.0070.01019.39
7.4.70.0070.01116.78
7.4.60.0060.01116.79
7.4.50.0060.00916.75
7.4.40.0100.00716.54
7.4.00.0080.00515.30
7.3.330.0050.00013.30
7.3.320.0000.00613.52
7.3.310.0030.00316.42
7.3.300.0080.00016.54
7.3.290.0070.00016.46
7.3.280.0090.00616.43
7.3.260.0110.00616.63
7.3.240.0110.01116.79
7.3.230.0090.00916.64
7.3.210.0030.01916.50
7.3.200.0110.00616.72
7.3.190.0150.00416.65
7.3.180.0090.01316.77
7.3.170.0070.01016.69
7.3.160.0090.00616.46
7.3.120.0030.01415.20
7.3.110.0150.00315.32
7.3.100.0110.00615.02
7.3.90.0130.00314.85
7.3.80.0070.00715.16
7.3.70.0030.00714.79
7.3.60.0080.00815.09
7.3.50.0040.00414.95
7.3.40.0140.00015.12
7.3.30.0000.00915.18
7.3.20.0140.00016.93
7.3.10.0100.00716.86
7.3.00.0050.01216.87
7.2.330.0100.00716.88
7.2.320.0130.00316.94
7.2.310.0130.01016.81
7.2.300.0030.01416.98
7.2.290.0110.00516.64
7.2.250.0100.01015.33
7.2.240.0030.01715.00
7.2.230.0000.01515.27
7.2.220.0040.01515.42
7.2.210.0060.01215.22
7.2.200.0040.00715.29
7.2.190.0030.00914.95
7.2.180.0120.00415.22
7.2.170.0090.00615.09
7.2.120.0490.01014.88
7.2.110.0660.00314.94
7.2.100.0750.01314.94
7.2.90.0670.01014.71
7.2.80.0680.00315.06
7.2.70.0580.01015.20
7.2.60.0410.01015.02
7.2.50.0380.00714.91
7.2.40.0460.00615.22
7.2.30.0400.00615.35
7.2.20.0910.01015.27
7.2.10.0760.01615.13
7.2.00.0390.01315.30
7.1.330.0030.01016.23
7.1.320.0060.01215.68
7.1.310.0070.01015.62
7.1.300.0060.00915.95
7.1.290.0060.00815.71
7.1.280.0000.01016.15
7.1.270.0040.00816.00
7.1.260.0040.01116.12
7.1.240.0770.00014.11
7.1.230.0410.01014.03
7.1.220.0740.01014.07
7.1.210.0400.00613.87
7.1.200.0480.00713.69
7.1.190.0770.00914.20
7.1.180.1190.00613.94
7.1.170.0410.00314.11
7.1.160.0510.00313.87
7.1.150.0570.01014.20
7.1.140.0760.01414.18
7.1.130.0470.00914.26
7.1.120.0750.00714.00
7.1.110.0810.01313.74
7.1.100.0360.01013.99
7.1.90.0410.00714.12
7.1.80.0780.01014.24
7.1.70.0750.01413.80
7.1.60.0450.00713.85
7.1.50.0610.00713.95
7.1.40.0430.00313.97
7.1.30.0590.00713.84
7.1.20.0840.00713.95
7.1.10.0720.01014.07
7.1.00.0820.00313.99
5.6.380.0080.01014.22

preferences:
60.28 ms | 400 KiB | 5 Q