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(get_called_class(), 'static::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.00718.68
8.3.50.0080.01222.06
8.3.40.0100.00719.15
8.3.30.0090.00619.17
8.3.20.0030.00620.39
8.3.10.0050.00321.92
8.3.00.0050.00322.39
8.2.180.0090.00616.63
8.2.170.0070.00722.96
8.2.160.0070.00721.12
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0000.00726.16
8.2.120.0100.00019.61
8.2.110.0060.00321.30
8.2.100.0040.00718.03
8.2.90.0000.00819.21
8.2.80.0040.00417.97
8.2.70.0060.00317.88
8.2.60.0080.00017.93
8.2.50.0060.00318.10
8.2.40.0040.00418.16
8.2.30.0070.00318.27
8.2.20.0000.00917.76
8.2.10.0000.00717.78
8.2.00.0060.00317.83
8.1.280.0140.00025.92
8.1.270.0050.00323.79
8.1.260.0080.00026.35
8.1.250.0140.00028.09
8.1.240.0030.01723.98
8.1.230.0080.00419.48
8.1.220.0050.00317.79
8.1.210.0060.00318.77
8.1.200.0030.00617.36
8.1.190.0090.00017.35
8.1.180.0000.00818.10
8.1.170.0060.00318.70
8.1.160.0040.00422.04
8.1.150.0050.00318.69
8.1.140.0000.01017.55
8.1.130.0030.00317.83
8.1.120.0000.00717.46
8.1.110.0030.00517.51
8.1.100.0000.00717.59
8.1.90.0000.00717.59
8.1.80.0000.00717.45
8.1.70.0030.00317.49
8.1.60.0040.00417.57
8.1.50.0030.00617.52
8.1.40.0080.00417.51
8.1.30.0000.00817.70
8.1.20.0040.00417.58
8.1.10.0070.00017.64
8.1.00.0040.00417.59
8.0.300.0000.00718.77
8.0.290.0030.00616.88
8.0.280.0000.00818.52
8.0.270.0020.00517.33
8.0.260.0030.00316.97
8.0.250.0030.00517.06
8.0.240.0040.00417.12
8.0.230.0030.00317.07
8.0.220.0070.00016.91
8.0.210.0000.00717.08
8.0.200.0000.00717.05
8.0.190.0030.00517.06
8.0.180.0000.00717.06
8.0.170.0060.00316.96
8.0.160.0070.00016.94
8.0.150.0080.00016.95
8.0.140.0070.00016.92
8.0.130.0000.00613.50
8.0.120.0000.00816.90
8.0.110.0000.00916.98
8.0.100.0080.00017.00
8.0.90.0050.00316.78
8.0.80.0030.01216.98
8.0.70.0040.00417.02
8.0.60.0000.00716.86
8.0.50.0070.00016.80
8.0.30.0070.01217.31
8.0.20.0130.00917.40
8.0.10.0040.00317.06
8.0.00.0100.00716.94
7.4.330.0000.00615.09
7.4.320.0030.00316.52
7.4.300.0030.00316.51
7.4.290.0040.00416.67
7.4.280.0050.00316.60
7.4.270.0000.00716.74
7.4.260.0000.00716.73
7.4.250.0000.00816.52
7.4.240.0040.00316.64
7.4.230.0000.00816.84
7.4.220.0060.01316.79
7.4.210.0050.01016.61
7.4.200.0070.00016.49
7.4.190.0030.00316.82
7.4.160.0050.01116.73
7.4.150.0070.01117.40
7.4.140.0110.01117.86
7.4.130.0090.01016.70
7.4.120.0060.01016.67
7.4.110.0170.00716.78
7.4.100.0090.00916.75
7.4.90.0120.00616.60
7.4.80.0070.01019.39
7.4.70.0110.00616.76
7.4.60.0050.01116.50
7.4.50.0000.00816.54
7.4.40.0090.00922.77
7.4.30.0150.00316.68
7.4.00.0100.00715.14
7.3.330.0030.00313.50
7.3.320.0000.00513.43
7.3.310.0030.00316.63
7.3.300.0070.00016.54
7.3.290.0060.01216.40
7.3.280.0070.01116.42
7.3.270.0100.01117.40
7.3.260.0110.00616.77
7.3.250.0110.00616.60
7.3.240.0160.00316.63
7.3.230.0150.00316.55
7.3.210.0030.01316.53
7.3.200.0060.01016.54
7.3.190.0100.01416.72
7.3.180.0150.00616.46
7.3.170.0160.00016.60
7.3.160.0090.00616.73
7.3.120.0090.00614.89
7.2.330.0030.01516.82
7.2.320.0070.01116.78
7.2.310.0100.01316.81
7.2.300.0000.01616.79
7.2.290.0130.01016.61
7.2.00.0080.00819.45
7.1.200.0040.01115.74
7.1.100.0090.00618.67
7.1.70.0030.00617.39
7.1.60.0030.01419.82
7.1.50.0070.00417.22
7.1.00.0030.07722.46
7.0.200.0040.00716.68
7.0.140.0000.07722.09
7.0.70.0200.07021.93
7.0.60.0030.08721.75
7.0.50.0030.08022.11
7.0.40.0100.07720.03
7.0.30.0000.04720.10
7.0.20.0000.09020.05
7.0.10.0070.06020.04
7.0.00.0030.08020.09
5.6.280.0000.07720.91
5.6.220.0170.07020.67
5.6.210.0030.06720.56
5.6.200.0030.08721.09
5.6.190.0070.08021.05
5.6.180.0030.07721.12
5.6.170.0070.08721.09
5.6.160.0000.06720.98
5.6.150.0130.08321.03
5.6.140.0000.06020.95
5.6.130.0070.06721.02
5.6.120.0070.08721.08
5.6.110.0130.07321.07
5.6.100.0030.08321.04
5.6.90.0200.07721.02
5.6.80.0100.07720.56
5.6.70.0100.07720.40
5.6.60.0100.07320.41
5.6.50.0030.06320.43
5.6.40.0070.08320.48
5.6.30.0070.07320.39
5.6.20.0070.05720.31
5.6.10.0070.08020.30
5.6.00.0000.06020.46
5.5.360.0070.05020.31
5.5.350.0130.07720.47
5.5.340.0070.08020.78
5.5.330.0030.08320.88
5.5.320.0000.06720.84
5.5.310.0030.05320.78
5.5.300.0030.08720.88
5.5.290.0070.08020.93
5.5.280.0100.08020.83
5.5.270.0070.07720.82
5.5.260.0100.06320.91
5.5.250.0000.08020.72
5.5.240.0100.07020.30
5.5.230.0170.06320.27
5.5.220.0070.05020.18
5.5.210.0000.06020.30
5.5.200.0100.07720.12
5.5.190.0100.07720.29
5.5.180.0070.07720.29
5.5.160.0070.08020.16
5.5.150.0070.08020.13
5.5.140.0330.06020.13
5.5.130.0000.04020.23
5.5.120.0070.06320.27
5.5.110.0030.05020.18
5.5.100.0000.08720.13
5.5.90.0030.08020.18
5.5.80.0070.07320.18
5.5.70.0030.04020.06
5.5.60.0030.08020.03
5.5.50.0070.07320.16
5.5.40.0100.06320.08
5.5.30.0070.06720.11
5.5.20.0070.07319.99
5.5.10.0030.08020.03
5.5.00.0030.07720.12
5.4.450.0070.08019.38
5.4.440.0070.08319.45
5.4.430.0030.08019.36
5.4.420.0000.08319.45
5.4.410.0030.07019.07
5.4.400.0030.06019.24
5.4.390.0030.06019.14
5.4.380.0000.06319.12
5.4.370.0100.07019.18
5.4.360.0030.08318.88
5.4.350.0070.05718.85
5.4.340.0130.05319.18
5.4.320.0100.06019.19
5.4.310.0000.04319.03
5.4.300.0000.04319.21
5.4.290.0070.05019.16
5.4.280.0030.08019.11
5.4.270.0030.07318.94
5.4.260.0070.07719.04
5.4.250.0070.05319.04
5.4.240.0100.07319.04
5.4.230.0070.04719.02
5.4.220.0030.08019.12
5.4.210.0030.04718.89
5.4.200.0030.06319.20
5.4.190.0070.07719.02
5.4.180.0000.06718.94
5.4.170.0000.08319.07
5.4.160.0030.08018.82
5.4.150.0130.07019.19
5.4.140.0000.08016.50
5.4.130.0030.06716.24
5.4.120.0030.07716.38
5.4.110.0070.07016.52
5.4.100.0100.05316.48
5.4.90.0030.05016.53
5.4.80.0130.06316.47
5.4.70.0000.08016.38
5.4.60.0030.07316.36
5.4.50.0000.06716.36
5.4.40.0000.07316.51
5.4.30.0070.07316.38
5.4.20.0000.08016.43
5.4.10.0030.07016.46
5.4.00.0070.06015.88
5.3.290.0100.06714.70
5.3.280.0030.07714.58
5.3.270.0000.05014.72
5.3.260.0070.07314.53
5.3.250.0030.07314.61
5.3.240.0070.07714.75
5.3.230.0030.07314.55
5.3.220.0030.07714.58
5.3.210.0000.08014.71
5.3.200.0030.07014.71
5.3.190.0030.07314.64
5.3.180.0000.08014.50
5.3.170.0030.08014.68
5.3.160.0100.07314.52
5.3.150.0070.08714.54
5.3.140.0000.08014.65
5.3.130.0030.06314.70
5.3.120.0100.06014.57
5.3.110.0030.07314.48
5.3.100.0030.05014.09
5.3.90.0000.05714.14
5.3.80.0000.06314.07
5.3.70.0000.07714.04
5.3.60.0030.07314.03
5.3.50.0030.07013.89
5.3.40.0030.07713.88
5.3.30.0030.07713.84
5.3.20.0030.04313.67
5.3.10.0070.07013.80
5.3.00.0000.07313.62
5.2.170.0070.06011.06
5.2.160.0000.05311.20
5.2.150.0030.06711.25
5.2.140.0000.05711.18
5.2.130.0030.04311.16
5.2.120.0030.06311.04
5.2.110.0000.05311.01
5.2.100.0030.04311.24
5.2.90.0030.05311.13
5.2.80.0030.04011.01
5.2.70.0070.06011.16
5.2.60.0000.05011.12
5.2.50.0030.06011.11
5.2.40.0070.06011.03
5.2.30.0070.06311.08
5.2.20.0030.06310.87
5.2.10.0030.05310.80
5.2.00.0030.05710.80
5.1.60.0030.05310.80
5.1.50.0070.04710.80
5.1.40.0030.04310.80
5.1.30.0030.05310.80
5.1.20.0030.04010.80
5.1.10.0070.05010.80
5.1.00.0070.05310.80
5.0.50.0030.04710.80
5.0.40.0030.03710.80
5.0.30.0000.07010.80
5.0.20.0030.03710.80
5.0.10.0000.04710.80
5.0.00.0030.06310.80
4.4.90.0000.03710.80
4.4.80.0000.03710.80
4.4.70.0070.02310.80
4.4.60.0030.03010.80
4.4.50.0030.03310.80
4.4.40.0000.05310.80
4.4.30.0000.03710.80
4.4.20.0000.03710.80
4.4.10.0000.03310.80
4.4.00.0000.05310.80
4.3.110.0000.03710.80
4.3.100.0070.03010.80
4.3.90.0030.03010.80
4.3.80.0000.05310.80
4.3.70.0000.03710.80
4.3.60.0000.02310.80
4.3.50.0030.03310.80
4.3.40.0000.04710.80
4.3.30.0000.03710.80
4.3.20.0000.03310.80
4.3.10.0000.03710.80
4.3.00.0000.02710.80

preferences:
51.86 ms | 401 KiB | 5 Q