3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo Module::work('hello world.'), "\n"; echo MyModule::work('hello world.'); abstract class Module { private static $mask = '[[[%s]]]'; public static function work($it) { return preg_replace_callback('~\w+~', array('static', 'self::replace'), $it); } private static function replace($matches) { return sprintf(self::$mask, $matches[0]); } } abstract class MyModule extends Module { protected static $mask = '{{{%s}}}'; protected static function replace($matches) { return sprintf(self::$mask, $matches[0]); } }

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.0130.00618.43
8.3.50.0100.00621.26
8.3.40.0070.00719.08
8.3.30.0040.01418.92
8.3.20.0030.00518.88
8.3.10.0080.00020.92
8.3.00.0070.00021.89
8.2.180.0100.01016.88
8.2.170.0080.00822.96
8.2.160.0110.00720.92
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0060.00321.00
8.2.110.0030.00620.39
8.2.100.0090.00318.03
8.2.90.0040.00419.40
8.2.80.0080.00017.97
8.2.70.0040.00417.63
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0040.00418.34
8.2.30.0080.00021.31
8.2.20.0040.00417.88
8.2.10.0030.00517.84
8.2.00.0040.00917.87
8.1.280.0120.00325.92
8.1.270.0080.00023.99
8.1.260.0060.00326.35
8.1.250.0070.00028.09
8.1.240.0060.00322.66
8.1.230.0070.00420.97
8.1.220.0040.00418.77
8.1.210.0040.00418.91
8.1.200.0030.00617.48
8.1.190.0000.00717.50
8.1.180.0050.00318.10
8.1.170.0040.00418.74
8.1.160.0000.00718.83
8.1.150.0000.00718.65
8.1.140.0000.00817.46
8.1.130.0030.00317.80
8.1.120.0020.00517.55
8.1.110.0060.00317.43
8.1.100.0000.00717.53
8.1.90.0040.00417.47
8.1.80.0040.00417.41
8.1.70.0030.00317.34
8.1.60.0040.00417.68
8.1.50.0040.00417.63
8.1.40.0050.00217.49
8.1.30.0040.00417.68
8.1.20.0040.00417.64
8.1.10.0040.00417.63
8.1.00.0020.00517.59
8.0.300.0000.00819.89
8.0.290.0000.00717.16
8.0.280.0070.00018.59
8.0.270.0030.00317.20
8.0.260.0000.00816.90
8.0.250.0040.00416.98
8.0.240.0040.00416.97
8.0.230.0030.00316.92
8.0.220.0080.00017.00
8.0.210.0070.00016.98
8.0.200.0000.00616.93
8.0.190.0040.00416.94
8.0.180.0030.00616.98
8.0.170.0040.00317.02
8.0.160.0030.00516.96
8.0.150.0000.00816.89
8.0.140.0080.00016.91
8.0.130.0000.00613.36
8.0.120.0070.00016.73
8.0.110.0030.00516.71
8.0.100.0070.00016.78
8.0.90.0070.00016.79
8.0.80.0080.00716.98
8.0.70.0070.00016.75
8.0.60.0000.00716.71
8.0.50.0000.00716.82
8.0.30.0050.01517.36
8.0.20.0100.00817.40
8.0.10.0050.00317.04
8.0.00.0080.01016.94
7.4.330.0030.00316.85
7.4.320.0030.00316.68
7.4.300.0030.00316.66
7.4.290.0030.00316.61
7.4.280.0070.00016.55
7.4.270.0000.00716.72
7.4.260.0000.00613.35
7.4.250.0000.00816.67
7.4.240.0040.00416.68
7.4.230.0080.00016.58
7.4.220.0060.01416.65
7.4.210.0050.01016.73
7.4.200.0040.00416.55
7.4.190.0000.00716.83
7.4.160.0080.00816.61
7.4.150.0070.01017.40
7.4.140.0140.00717.86
7.4.130.0100.01016.61
7.4.120.0090.00916.68
7.4.110.0100.00716.60
7.4.100.0040.01316.56
7.4.90.0150.00316.57
7.4.80.0090.00919.39
7.4.70.0090.00816.69
7.4.60.0140.00716.71
7.4.50.0030.00616.57
7.4.40.0070.00722.77
7.4.30.0060.01116.54
7.4.00.0070.01015.05
7.3.330.0030.00313.52
7.3.320.0020.00213.28
7.3.310.0000.00716.55
7.3.300.0000.00716.38
7.3.290.0070.00716.38
7.3.280.0110.00616.44
7.3.270.0120.00617.40
7.3.260.0110.00818.24
7.3.250.0060.01416.63
7.3.240.0140.00316.61
7.3.230.0120.00616.52
7.3.210.0060.01016.45
7.3.200.0100.00719.39
7.3.190.0090.00916.67
7.3.180.0030.01716.67
7.3.170.0140.00316.64
7.3.160.0090.00616.40
7.3.120.0110.00715.00
7.2.330.0150.00416.67
7.2.320.0140.00716.58
7.2.310.0120.00616.71
7.2.300.0130.00316.72
7.2.290.0030.01316.75
7.2.00.0090.00319.35
7.1.100.0040.00718.13
7.1.70.0030.00517.33
7.1.60.0110.00419.40
7.1.50.0110.00717.20
7.1.00.0030.03322.29
7.0.200.0000.00916.94
7.0.140.0000.07722.11
7.0.60.0270.05020.03
7.0.50.0030.08017.88
7.0.40.0130.04320.29
7.0.30.0230.07320.35
7.0.20.0130.04720.11
7.0.10.0100.03720.14
7.0.00.0130.08320.31
5.6.280.0000.07720.86
5.6.210.0070.08720.70
5.6.200.0070.07718.16
5.6.190.0130.07720.46
5.6.180.0170.04020.65
5.6.170.0330.03320.54
5.6.160.0100.04020.46
5.6.150.0100.08018.18
5.6.140.0170.07718.23
5.6.130.0030.08718.11
5.6.120.0100.06021.00
5.6.110.0200.07020.96
5.6.100.0070.06721.04
5.6.90.0070.04721.00
5.6.80.0170.07020.52
5.5.350.0330.07020.43
5.5.340.0100.07717.96
5.5.330.0070.07320.21
5.5.320.0500.04320.32
5.5.310.0300.07320.36
5.5.300.0030.08017.99
5.5.290.0070.08318.08
5.5.280.0070.07020.85
5.5.270.0030.07720.73
5.5.260.0130.08320.65
5.5.250.0000.06020.71
5.5.240.0170.06720.30
5.4.450.0430.06319.27
5.4.440.0270.06019.33
5.4.430.2030.05719.53
5.4.420.0270.07319.54
5.4.410.1600.05719.15
5.4.400.4630.03319.13
5.4.390.3670.04318.99
5.4.380.5830.02718.99
5.4.370.2670.03318.95
5.4.360.3330.04019.25
5.4.350.3400.03319.15
5.4.340.3700.03018.93
5.4.320.3630.03019.11
5.4.310.4030.04018.97
5.4.300.3870.04019.09
5.4.290.4130.04019.18
5.4.280.3700.03719.22
5.4.270.3700.03318.95
5.4.260.3470.04319.21
5.4.250.3970.04018.96
5.4.240.4430.03319.20
5.4.230.4830.04719.20
5.4.220.4030.04019.14
5.4.210.4070.04019.16
5.4.200.3830.03718.96
5.4.190.3930.02719.20
5.4.180.4630.04019.02
5.4.170.4570.03719.00
5.4.160.4530.03019.03
5.4.150.4530.04019.16
5.4.140.4430.03716.41
5.4.130.4500.03716.52
5.4.120.4570.03716.45
5.4.110.4530.03316.50
5.4.100.3630.04716.40
5.4.90.3730.03316.61
5.4.80.3700.03016.52
5.4.70.3530.03316.55
5.4.60.3630.03716.30
5.4.50.3500.03716.41
5.4.40.4270.04016.29
5.4.30.3800.04016.22
5.4.20.3600.03716.49
5.4.10.3630.03716.53
5.4.00.4000.03315.96
5.3.290.3300.03714.73
5.3.280.3700.03014.75
5.3.270.4500.03714.67
5.3.260.4330.04014.61
5.3.250.4030.03314.60
5.3.240.3730.04014.61
5.3.230.4600.03314.62
5.3.220.5830.03714.46
5.3.210.4630.03714.60
5.3.200.4530.03714.46
5.3.190.3900.04014.60
5.3.180.3570.04014.57
5.3.170.3530.03714.57
5.3.160.3630.03314.45
5.3.150.3600.03014.46
5.3.140.3670.03314.47
5.3.130.3730.04014.57
5.3.120.3700.04014.57
5.3.110.3870.03314.58
5.3.100.3900.03714.11
5.3.90.4600.03314.04
5.3.80.4530.03313.93
5.3.70.4600.04013.94
5.3.60.4030.03014.16
5.3.50.3530.03714.00
5.3.40.3600.02714.01
5.3.30.4470.03713.97
5.3.20.4570.03313.59
5.3.10.4500.04013.70
5.3.00.4030.03313.70
5.2.170.2930.02711.11
5.2.160.3100.03011.20
5.2.150.3770.02311.23
5.2.140.3970.02311.07
5.2.130.3500.02711.27
5.2.120.3800.03011.07
5.2.110.3970.03311.15
5.2.100.0100.06011.26
5.2.90.0030.03011.04
5.2.80.0100.05311.12
5.2.70.0030.05311.14
5.2.60.3730.02310.95
5.2.50.3130.02710.94
5.2.40.3130.03011.00
5.2.30.3230.02710.89
5.2.20.3170.03310.92
5.2.10.3130.03010.90
5.2.00.2900.03310.72
5.1.60.2570.02710.07
5.1.50.2670.01710.06
5.1.40.2630.0279.98
5.1.30.2500.03010.30
5.1.20.2670.02710.42
5.1.10.2670.02310.22
5.1.00.2430.02010.08
5.0.50.1570.0208.62
5.0.40.1770.0208.46
5.0.30.1400.0338.19
5.0.20.1400.0208.18
5.0.10.0030.0438.13
5.0.00.0000.0408.09
4.4.90.0900.0277.60
4.4.80.1370.0177.60
4.4.70.1470.0137.60
4.4.60.1730.0177.60
4.4.50.1700.0207.60
4.4.40.1570.0277.60
4.4.30.1300.0177.60
4.4.20.1600.0177.60
4.4.10.1530.0207.60
4.4.00.1770.0277.60
4.3.110.1630.0207.60
4.3.100.1470.0137.60
4.3.90.1330.0137.60
4.3.80.0030.0277.60
4.3.70.0000.0137.60
4.3.60.0000.0137.60
4.3.50.0030.0137.60
4.3.40.0000.0277.60
4.3.30.0030.0177.60
4.3.20.0000.0177.60
4.3.10.0000.0137.60
4.3.00.0000.0177.60

preferences:
44.43 ms | 401 KiB | 5 Q