3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = 'What will happen to the #globe if there is more #sunlight more #moonlight but less overall #light. Ah! Funny little #joke. Goodbye fellas!!! #Morning Jokes #For No one.'; $GLOBALS['_loops'] = 0; function replace_hashes($match) { var_dump($match); return ++$GLOBALS['_loops'] <= 3 ? $match[0] : ' '; } echo "BEFORE : ", $message, "\n"; echo "AFTER : ", preg_replace_callback('~\h*#[a-z]+\h*~i', 'replace_hashes', $message), "\n"; echo "LOOPS : ", $GLOBALS['_loops'], "\n";

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.0000.01518.52
8.3.50.0120.00522.20
8.3.40.0110.01118.92
8.3.30.0110.00719.05
8.3.20.0050.00320.34
8.3.10.0030.00523.66
8.3.00.0040.00420.90
8.2.180.0140.00416.38
8.2.170.0090.00622.96
8.2.160.0100.00320.39
8.2.150.0030.00624.18
8.2.140.0060.00324.66
8.2.130.0150.00326.16
8.2.120.0060.00319.61
8.2.110.0110.00422.25
8.2.100.0080.00418.09
8.2.90.0050.00319.35
8.2.80.0060.00317.97
8.2.70.0040.00417.88
8.2.60.0080.00418.04
8.2.50.0040.00418.07
8.2.40.0040.00420.07
8.2.30.0040.00418.32
8.2.20.0080.00017.91
8.2.10.0040.00418.12
8.2.00.0080.00017.75
8.1.280.0100.00725.92
8.1.270.0030.00522.00
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00323.96
8.1.230.0000.01119.02
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0040.00417.60
8.1.190.0000.00817.48
8.1.180.0000.00818.10
8.1.170.0080.00018.74
8.1.160.0040.00421.95
8.1.150.0040.00418.79
8.1.140.0070.00017.64
8.1.130.0030.00717.77
8.1.120.0000.00717.51
8.1.110.0000.00817.61
8.1.100.0080.00017.50
8.1.90.0040.00417.60
8.1.80.0000.00817.62
8.1.70.0030.00317.61
8.1.60.0040.00417.71
8.1.50.0030.00617.70
8.1.40.0030.00517.59
8.1.30.0030.00617.63
8.1.20.0000.00817.71
8.1.10.0030.00517.67
8.1.00.0030.00517.68
8.0.300.0000.00718.77
8.0.290.0000.00716.73
8.0.280.0000.00718.51
8.0.270.0030.00317.23
8.0.260.0060.00017.24
8.0.250.0030.00317.04
8.0.240.0040.00417.06
8.0.230.0000.00717.10
8.0.220.0040.00417.08
8.0.210.0030.00317.02
8.0.200.0070.00017.14
8.0.190.0040.00417.10
8.0.180.0040.00416.94
8.0.170.0040.00416.95
8.0.160.0000.00717.09
8.0.150.0030.00616.97
8.0.140.0030.00517.04
8.0.130.0060.00013.44
8.0.120.0040.00417.01
8.0.110.0070.00017.02
8.0.100.0040.00416.86
8.0.90.0020.00516.94
8.0.80.0160.00617.05
8.0.70.0020.00516.93
8.0.60.0050.00217.02
8.0.50.0040.00417.07
8.0.30.0140.00817.14
8.0.20.0090.00917.40
8.0.10.0040.00416.97
8.0.00.0100.00916.94
7.4.330.0000.00615.05
7.4.320.0070.00016.82
7.4.300.0030.00316.78
7.4.290.0040.00416.66
7.4.280.0030.00716.76
7.4.270.0000.00716.81
7.4.260.0040.00416.71
7.4.250.0040.00416.63
7.4.240.0040.00416.82
7.4.230.0030.00316.91
7.4.220.0190.00616.73
7.4.210.0110.00416.85
7.4.200.0000.00716.79
7.4.160.0100.00616.59
7.4.150.0040.01417.40
7.4.140.0030.01417.86
7.4.130.0080.01016.75
7.4.120.0070.01016.69
7.4.110.0120.00616.79
7.4.100.0120.00616.59
7.4.90.0150.01216.72
7.4.80.0060.01319.39
7.4.70.0150.00416.65
7.4.60.0070.01016.76
7.4.50.0060.00316.56
7.4.40.0070.01116.72
7.4.30.0090.00916.48
7.4.00.0060.00615.02
7.3.330.0000.00513.38
7.3.320.0080.00013.46
7.3.310.0040.00416.48
7.3.300.0000.00716.52
7.3.290.0030.01216.53
7.3.280.0120.00416.48
7.3.270.0120.00617.40
7.3.260.0060.01216.68
7.3.250.0100.01016.54
7.3.240.0090.00916.94
7.3.230.0130.00616.59
7.3.210.0040.01816.50
7.3.200.0060.01119.39
7.3.190.0030.02016.74
7.3.180.0040.01416.71
7.3.170.0110.01116.51
7.3.160.0030.01416.49
7.3.120.0100.00715.13
7.3.10.0000.01517.00
7.3.00.0070.01016.66
7.2.330.0090.01516.69
7.2.320.0100.01016.91
7.2.310.0070.01016.96
7.2.300.0100.00717.02
7.2.290.0040.01516.93
7.2.130.0070.00317.18
7.2.120.0060.00616.89
7.2.110.0000.01416.75
7.2.100.0120.00616.90
7.2.90.0100.01017.16
7.2.80.0140.00716.81
7.2.70.0180.00716.93
7.2.60.0140.00316.99
7.2.50.0040.01216.99
7.2.40.0150.00416.99
7.2.30.0110.00417.18
7.2.20.0060.00616.99
7.2.10.0090.00317.05
7.2.00.0060.00818.47
7.1.250.0100.00716.00
7.1.200.0040.00815.95
7.1.100.0090.00618.09
7.1.70.0050.00217.38
7.1.60.0100.01419.70
7.1.50.0140.01017.13
7.1.00.0130.06722.41
7.0.200.0000.00817.03
7.0.140.0100.06722.09
7.0.60.0070.07021.59
7.0.50.0000.04718.01
7.0.40.0030.06720.13
7.0.30.0430.07320.30
7.0.20.0300.04320.14
7.0.10.0000.08320.08
7.0.00.0030.07720.25
5.6.280.0070.07020.92
5.6.210.0070.08020.77
5.6.200.0100.03318.25
5.6.190.0070.05020.47
5.6.180.0300.04320.48
5.6.170.0230.04320.43
5.6.160.0070.07320.59
5.6.150.0070.04318.16
5.6.140.0030.04018.22
5.6.130.0170.04318.14
5.6.120.0100.08021.03
5.6.110.0100.07321.09
5.6.100.0170.06320.97
5.6.90.0170.07321.03
5.6.80.0000.06720.40
5.5.350.0130.07720.37
5.5.340.0070.05317.97
5.5.330.0100.04320.57
5.5.320.0500.06320.27
5.5.310.0200.07720.27
5.5.300.0070.08018.07
5.5.290.0030.05717.99
5.5.280.0100.08720.98
5.5.270.0030.04720.80
5.5.260.0100.08720.86
5.5.250.0030.04020.59
5.5.240.0230.06320.37
5.4.450.1030.04019.50
5.4.440.2730.03319.32
5.4.430.2130.03719.59
5.4.420.3770.03719.43
5.4.410.3830.04019.39
5.4.400.1200.05319.13
5.4.390.3670.04019.05
5.4.380.4000.03319.18
5.4.370.3670.04018.99
5.4.360.4230.05019.17
5.4.350.4070.03019.11
5.4.340.3670.03718.99
5.4.320.3700.04018.95
5.4.310.3600.04319.11
5.4.300.3870.04318.95
5.4.290.4000.03719.20
5.4.280.3670.04018.93
5.4.270.3970.04019.17
5.4.260.3970.04019.06
5.4.250.3770.04019.26
5.4.240.3770.03719.23
5.4.230.3600.04319.19
5.4.220.3530.03718.99
5.4.210.4470.04019.05
5.4.200.3930.04319.04
5.4.190.3900.03719.10
5.4.180.3670.03719.16
5.4.170.3730.03718.94
5.4.160.4730.04019.11
5.4.150.4000.04318.97
5.4.140.3800.04316.54
5.4.130.3970.03316.40
5.4.120.1230.03716.55
5.4.110.2530.03716.54
5.4.100.3730.03716.58
5.4.90.3830.04016.61
5.4.80.4000.03316.55
5.4.70.3300.04016.66
5.4.60.2870.03716.30
5.4.50.3170.04016.41
5.4.40.2730.04016.63
5.4.30.3430.03016.43
5.4.20.3630.03716.44
5.4.10.2930.03716.42
5.4.00.3700.03015.82
5.3.290.5030.03314.72
5.3.280.4330.03714.60
5.3.270.3500.03314.62
5.3.260.3270.03714.77
5.3.250.4330.04014.50
5.3.240.4100.04014.64
5.3.230.2130.03314.66
5.3.220.1000.03314.58
5.3.210.2730.03714.57
5.3.200.3630.04014.56
5.3.190.3930.03314.60
5.3.180.3770.04314.57
5.3.170.3130.03014.57
5.3.160.3570.03014.57
5.3.150.2200.04314.62
5.3.140.3570.03314.55
5.3.130.3930.04314.55
5.3.120.3830.03714.70
5.3.110.3900.03314.55
5.3.100.3700.04014.18
5.3.90.3770.04013.90
5.3.80.3930.03713.94
5.3.70.3500.04014.04
5.3.60.2870.03314.00
5.3.50.3970.03313.96
5.3.40.3970.04013.89
5.3.30.5200.03313.91
5.3.20.4200.04013.66
5.3.10.4270.04013.70
5.3.00.3370.03713.56
5.2.170.3270.02311.20
5.2.160.2970.03011.18
5.2.150.3500.03011.04
5.2.140.3070.03011.15
5.2.130.3330.02711.16
5.2.120.3430.03711.25
5.2.110.3500.03011.09
5.2.100.3070.02711.18
5.2.90.3270.03711.11
5.2.80.3300.03011.15
5.2.70.3600.03011.13
5.2.60.3230.03011.20
5.2.50.3430.02711.09
5.2.40.2630.02311.01
5.2.30.2570.02711.14
5.2.20.2970.02010.96
5.2.10.2470.03010.81
5.2.00.2800.02710.76
5.1.60.2670.02310.06
5.1.50.2870.0339.97
5.1.40.0030.02310.02
5.1.30.0030.05710.34
5.1.20.0070.03710.38
5.1.10.0030.0279.98
5.1.00.2030.02010.07
5.0.50.1470.0278.50
5.0.40.1470.0238.45
5.0.30.1270.0338.19
5.0.20.1500.0208.25
5.0.10.1400.0278.17
5.0.00.1500.0338.13
4.4.90.1270.0205.98
4.4.80.1470.0135.98
4.4.70.1470.0235.98
4.4.60.1400.0175.98
4.4.50.1200.0175.98
4.4.40.1600.0275.98
4.4.30.0100.0135.98
4.4.20.0000.0235.99
4.4.10.1300.0205.99
4.4.00.1270.0235.99
4.3.110.1270.0175.99
4.3.100.1630.0135.99
4.3.90.1800.0175.99
4.3.80.1270.0205.99
4.3.70.1730.0175.99
4.3.60.1600.0175.99
4.3.50.1700.0105.99
4.3.40.1430.0235.99
4.3.30.0870.0205.99
4.3.20.0470.0205.99
4.3.10.1000.0175.99
4.3.00.1000.0235.99

preferences:
52.67 ms | 401 KiB | 5 Q