3v4l.org

run code in 300+ PHP versions simultaneously
<?php $patternsArray = array(); $matchesArray = array(); $text = " Cassie, slipped on some glass and cut her ass!<br> 'Goshdamnit! Who left this damn mess out?' she cried.<br> 'Well, SHOOT, you should be more careful!' Mary laughed.<br> 'Hello! Why don't you clean up after yourself!' Cassie screamed.<br> 'Go to HELL!' Mary yelled back.<br> Then suddenly, blood started shooting everywhere.XXX "; $patternsArray[] = '/\basss?\b/i'; $patternsArray[] = '/damn/i'; $patternsArray[] = '/\bshoots?\b/i'; $patternsArray[] = '/\bhells?\b/i'; $patternsArray[] = '/XXX/i'; $cleanText = preg_replace_callback($patternsArray, function($matches) use (&$matchesArray) { list($word) = $matches; $matchesArray[] = $word; return str_repeat("*", strlen($word)); }, $text); var_dump($cleanText); var_dump($matchesArray);

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.0070.01117.01
8.5.00.0110.01220.34
8.4.150.0020.00114.05
8.4.140.0140.01017.70
8.4.130.0070.00317.91
8.4.120.0120.00820.71
8.4.110.0120.00922.60
8.4.100.0120.01017.94
8.4.90.0130.00722.33
8.4.80.0130.00719.75
8.4.70.0150.00618.30
8.4.60.0130.00818.98
8.4.50.0120.00918.87
8.4.40.0130.00617.78
8.4.30.0060.00320.71
8.4.20.0210.00017.89
8.4.10.0120.00626.07
8.3.280.0100.01018.71
8.3.270.0100.01216.62
8.3.260.0120.00816.66
8.3.250.0140.00618.86
8.3.240.0080.00918.54
8.3.230.0140.00616.56
8.3.220.0040.00419.15
8.3.210.0110.00416.73
8.3.200.0060.00416.58
8.3.190.0130.00617.19
8.3.180.0110.01016.64
8.3.170.0040.01118.81
8.3.160.0040.01117.25
8.3.150.0130.00618.41
8.3.140.0080.00017.24
8.3.130.0060.00918.55
8.3.120.0060.00318.79
8.3.110.0060.00320.94
8.3.100.0100.00324.06
8.3.90.0050.00326.77
8.3.80.0030.00616.86
8.3.70.0070.01417.00
8.3.60.0120.00618.39
8.3.50.0170.00224.64
8.3.40.0130.00619.09
8.3.30.0040.01219.14
8.3.20.0030.00624.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0110.00720.46
8.2.280.0160.00318.87
8.2.270.0100.01018.97
8.2.260.0120.00318.44
8.2.250.0040.00418.82
8.2.240.0060.00316.95
8.2.230.0040.00422.58
8.2.220.0030.00637.54
8.2.210.0070.00726.77
8.2.200.0090.00016.88
8.2.190.0180.00416.75
8.2.180.0100.00725.92
8.2.170.0070.00719.08
8.2.160.0110.00422.96
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00026.35
8.2.110.0060.00321.12
8.2.100.0000.01117.97
8.2.90.0040.00417.88
8.2.80.0040.00419.03
8.2.70.0050.00517.88
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0030.00518.28
8.2.30.0030.00518.32
8.2.20.0070.00018.28
8.2.10.0070.00019.46
8.2.00.0040.00419.41
8.1.330.0130.00523.74
8.1.320.0110.00816.65
8.1.310.0060.01218.60
8.1.300.0040.00420.09
8.1.290.0060.00330.84
8.1.280.0160.01025.92
8.1.270.0000.00723.99
8.1.260.0030.00628.09
8.1.250.0040.00428.09
8.1.240.0000.01020.71
8.1.230.0060.00617.89
8.1.220.0080.00017.76
8.1.210.0000.00818.77
8.1.200.0060.00317.48
8.1.190.0050.00317.48
8.1.180.0000.00818.10
8.1.170.0000.00818.77
8.1.160.0000.00719.00
8.1.150.0000.00718.86
8.1.140.0000.00818.85
8.1.130.0030.00320.19
8.1.120.0070.00017.63
8.1.110.0040.00417.63
8.1.100.0020.00517.61
8.1.90.0050.00317.63
8.1.80.0080.00317.65
8.1.70.0040.00417.68
8.1.60.0040.00417.73
8.1.50.0080.00017.59
8.1.40.0080.00017.70
8.1.30.0000.00817.75
8.1.20.0040.00417.66
8.1.10.0030.00617.75
8.1.00.0080.00017.54
8.0.300.0080.00018.77
8.0.290.0000.00816.84
8.0.280.0030.00318.51
8.0.270.0070.00018.19
8.0.260.0030.00318.36
8.0.250.0000.00717.09
8.0.240.0030.00317.14
8.0.230.0030.00317.12
8.0.220.0050.00316.94
8.0.210.0000.00717.05
8.0.200.0000.00617.01
8.0.190.0030.00617.14
8.0.180.0040.00416.99
8.0.170.0050.00517.12
8.0.160.0040.00417.14
8.0.150.0040.00417.00
8.0.140.0080.00017.02
8.0.130.0060.00013.42
8.0.120.0040.00417.09
8.0.110.0040.00417.13
8.0.100.0080.00017.07
8.0.90.0000.00716.95
8.0.80.0060.00917.03
8.0.70.0040.00417.07
8.0.60.0000.00717.06
8.0.50.0040.00416.88
8.0.30.0030.01317.39
8.0.20.0090.00917.50
8.0.10.0280.01017.40
8.0.00.0280.01417.56
7.4.330.0020.00215.55
7.4.320.0060.00016.79
7.4.300.0040.00416.86
7.4.290.0040.00416.61
7.4.280.0050.00316.69
7.4.270.0070.00016.90
7.4.260.0060.00013.40
7.4.250.0000.00816.78
7.4.240.0000.00816.86
7.4.230.0040.00416.86
7.4.220.0030.00416.63
7.4.210.0070.00916.77
7.4.200.0080.00016.94
7.4.150.0090.01217.40
7.4.140.0320.00317.40
7.4.130.0360.00917.40
7.4.120.0290.00817.40
7.4.110.0300.01017.40
7.4.100.0240.00817.40
7.4.90.0230.01417.40
7.4.80.0320.00017.40
7.4.70.0180.01517.40
7.4.60.0160.01617.40
7.4.50.0250.00717.40
7.4.40.0230.01217.40
7.4.30.0220.00917.40
7.4.20.0170.01417.40
7.4.10.0170.01417.40
7.4.00.0100.01117.40
7.3.330.0070.00016.53
7.3.320.0030.00513.52
7.3.310.0040.00416.40
7.3.300.0030.00316.44
7.3.290.0080.00916.52
7.3.270.0140.00817.40
7.3.260.0250.00917.40
7.3.250.0190.01917.40
7.3.240.0300.00817.40
7.3.230.0250.01117.40
7.3.220.0300.00517.40
7.3.210.0300.00717.40
7.3.200.0290.00417.40
7.3.190.0310.00517.40
7.3.180.0200.01417.40
7.3.170.0240.01017.40
7.3.160.0260.00917.40
7.3.150.0280.00617.40
7.3.140.0320.00017.40
7.3.130.0190.01317.40
7.3.120.0220.01017.40
7.3.110.0220.01117.40
7.3.100.0270.00817.40
7.3.90.0240.01017.40
7.3.80.0320.00817.40
7.3.70.0250.01117.40
7.3.60.0210.01417.40
7.3.50.0260.00817.40
7.3.40.0280.00317.40
7.3.30.0300.00317.40
7.3.20.0190.01617.40
7.3.10.0300.00617.40
7.3.00.0190.01317.40

preferences:
40.51 ms | 403 KiB | 5 Q