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('self', 'self::replace'), $it); } protected static function replace($matches) { return sprintf(self::$mask, $matches[0]); } } abstract class MyModule extends Module { private 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.0140.00718.68
8.3.50.0190.00222.11
8.3.40.0080.00819.09
8.3.30.0040.01118.98
8.3.20.0050.00318.95
8.3.10.0080.00020.73
8.3.00.0080.00021.85
8.2.180.0120.00916.63
8.2.170.0170.01122.96
8.2.160.0070.01020.35
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00019.38
8.2.110.0030.00721.97
8.2.100.0080.00418.03
8.2.90.0040.00419.16
8.2.80.0050.00317.97
8.2.70.0080.00017.75
8.2.60.0050.00518.03
8.2.50.0030.00518.07
8.2.40.0040.00418.22
8.2.30.0030.00619.85
8.2.20.0000.00817.75
8.2.10.0000.00717.75
8.2.00.0080.00017.83
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0070.00322.55
8.1.230.0110.00021.04
8.1.220.0050.00318.77
8.1.210.0000.00918.90
8.1.200.0080.00017.36
8.1.190.0060.00319.06
8.1.180.0040.00418.10
8.1.170.0060.00318.78
8.1.160.0070.00018.70
8.1.150.0050.00318.56
8.1.140.0040.00417.47
8.1.130.0070.00017.73
8.1.120.0080.00017.46
8.1.110.0000.00817.46
8.1.100.0040.00417.48
8.1.90.0040.00417.39
8.1.80.0040.00417.47
8.1.70.0070.00017.43
8.1.60.0090.00317.64
8.1.50.0030.00617.51
8.1.40.0070.00017.59
8.1.30.0050.00317.63
8.1.20.0000.00817.77
8.1.10.0080.00017.54
8.1.00.0060.00317.63
8.0.300.0050.00219.87
8.0.290.0030.00616.75
8.0.280.0080.00018.47
8.0.270.0000.00717.29
8.0.260.0000.00716.97
8.0.250.0000.00717.13
8.0.240.0080.00017.00
8.0.230.0030.00317.02
8.0.220.0050.00216.97
8.0.210.0000.00716.96
8.0.200.0000.00717.07
8.0.190.0000.00817.05
8.0.180.0040.00417.04
8.0.170.0040.00316.97
8.0.160.0080.00017.02
8.0.150.0040.00716.86
8.0.140.0070.00016.82
8.0.130.0030.00313.38
8.0.120.0030.00516.76
8.0.110.0030.00616.98
8.0.100.0000.00816.84
8.0.90.0000.00816.93
8.0.80.0070.01416.87
8.0.70.0000.00816.79
8.0.60.0030.00516.77
8.0.50.0040.00416.92
8.0.30.0080.01017.25
8.0.20.0090.01017.44
8.0.10.0040.00416.87
8.0.00.0060.01216.98
7.4.330.0050.00014.77
7.4.320.0030.00316.54
7.4.300.0040.00416.61
7.4.290.0040.00416.60
7.4.280.0040.00416.59
7.4.270.0000.00716.63
7.4.260.0000.00513.45
7.4.250.0030.00516.70
7.4.240.0030.00316.66
7.4.230.0070.00016.56
7.4.220.0070.01016.72
7.4.210.0040.01116.63
7.4.200.0000.00716.73
7.4.190.0030.00316.71
7.4.160.0180.00016.67
7.4.150.0070.01117.40
7.4.140.0180.00917.86
7.4.130.0090.00916.53
7.4.120.0080.01116.62
7.4.110.0120.00616.77
7.4.100.0100.01116.71
7.4.90.0040.01316.72
7.4.80.0090.00619.37
7.4.70.0030.01416.63
7.4.60.0070.01116.44
7.4.50.0030.00616.68
7.4.40.0070.01122.27
7.4.30.0080.00516.55
7.4.00.0040.01414.89
7.3.330.0000.00513.47
7.3.320.0050.00013.30
7.3.310.0070.00016.51
7.3.300.0060.00016.39
7.3.290.0110.00416.42
7.3.280.0090.00916.42
7.3.270.0100.01017.40
7.3.260.0150.00518.24
7.3.250.0110.00816.55
7.3.240.0060.00916.46
7.3.230.0120.00516.74
7.3.210.0120.00616.61
7.3.200.0080.00819.39
7.3.190.0100.00716.41
7.3.180.0130.00616.69
7.3.170.0060.01216.79
7.3.160.0090.01516.73
7.3.120.0040.01115.05
7.2.330.0140.00316.79
7.2.320.0030.01416.64
7.2.310.0100.01316.71
7.2.300.0070.00316.84
7.2.290.0080.00816.75
7.2.00.0170.00618.95
7.1.100.0040.01118.13
7.1.70.0100.00317.23
7.1.60.0070.01619.40
7.1.50.0000.02317.04
7.1.00.0100.06022.32
7.0.200.0000.01016.96
7.0.140.0100.06722.04
7.0.60.0130.06720.01
7.0.50.0070.08017.78
7.0.40.0070.06317.86
7.0.30.0100.04717.80
7.0.20.0130.06317.86
7.0.10.0100.07017.76
7.0.00.0100.08017.76
5.6.280.0000.07721.09
5.6.210.0030.04020.73
5.6.200.0070.04018.29
5.6.190.0000.08718.20
5.6.180.0130.06318.16
5.6.170.0130.07318.12
5.6.160.0030.08718.19
5.6.150.0130.05318.15
5.6.140.0000.05318.28
5.6.130.0070.08718.28
5.6.120.0000.04718.19
5.6.110.0070.08018.18
5.6.100.0100.07718.15
5.6.90.0030.05018.27
5.6.80.0100.07017.62
5.6.70.0070.05317.57
5.6.60.0030.08017.62
5.6.50.0100.07717.66
5.6.40.0030.08317.54
5.6.30.0170.06717.54
5.6.20.0070.05017.57
5.6.10.0030.06017.54
5.6.00.0170.04017.46
5.5.350.0270.07320.39
5.5.340.0100.04718.07
5.5.330.0100.07717.97
5.5.320.0100.07318.02
5.5.310.0070.08317.92
5.5.300.0100.08017.93
5.5.290.0070.04718.06
5.5.280.0170.07318.09
5.5.270.0070.06317.95
5.5.260.0030.07318.03
5.5.250.0030.07717.79
5.5.240.0030.07717.48
5.5.230.0070.04717.31
5.5.220.0070.06717.33
5.5.210.0100.06317.39
5.5.200.0100.07017.39
5.5.190.0030.04717.39
5.5.180.0070.06317.33
5.5.160.0030.06317.44
5.5.150.0030.04017.39
5.5.140.0130.03717.39
5.5.130.0070.07717.32
5.5.120.0000.08317.34
5.5.110.0070.08017.34
5.5.100.0030.07717.24
5.5.90.0030.05717.20
5.5.80.0070.05317.19
5.5.70.0100.03717.22
5.5.60.0070.04317.33
5.5.50.0000.04317.22
5.5.40.0000.04717.29
5.5.30.0170.06717.16
5.5.20.0100.04717.22
5.5.10.0100.04317.31
5.5.00.0100.06317.25
5.4.450.0070.06719.38
5.4.440.0100.05019.45
5.4.430.0030.08319.46
5.4.420.0070.06019.45
5.4.410.0070.05719.25
5.4.400.0030.07319.04
5.4.390.0100.07319.10
5.4.380.0100.04319.05
5.4.370.0070.05719.10
5.4.360.0170.06719.13
5.4.350.0070.05319.14
5.4.340.0100.07718.95
5.4.320.0030.04719.05
5.4.310.0030.05018.89
5.4.300.0130.07319.03
5.4.290.0070.07319.11
5.4.280.0130.07319.02
5.4.270.0030.06719.03
5.4.260.0030.05019.32
5.4.250.0070.07019.04
5.4.240.0000.04319.00
5.4.230.0030.05019.08
5.4.220.0070.04319.28
5.4.210.0030.04019.01
5.4.200.0070.04019.00
5.4.190.0030.07018.95
5.4.180.0130.06319.11
5.4.170.0000.07319.02
5.4.160.0000.04719.06
5.4.150.0070.05018.94
5.4.140.0030.07716.45
5.4.130.0030.04016.42
5.4.120.0070.06316.29
5.4.110.0000.06016.46
5.4.100.0100.06316.61
5.4.90.0100.07316.39
5.4.80.0030.05016.44
5.4.70.0030.05016.49
5.4.60.0070.06316.41
5.4.50.0100.05316.27
5.4.40.0100.06316.45
5.4.30.0070.06016.29
5.4.20.0070.06716.40
5.4.10.0070.06016.43
5.4.00.0130.03315.98
5.3.290.0130.04314.88
5.3.280.0000.04314.63
5.3.270.0030.06014.60
5.3.260.0130.07314.62
5.3.250.0170.07014.65
5.3.240.0070.07314.64
5.3.230.0030.04714.61
5.3.220.0000.06314.62
5.3.210.0100.06014.68
5.3.200.0100.04014.79
5.3.190.0070.07714.61
5.3.180.0100.05314.78
5.3.170.0100.04014.61
5.3.160.0070.07314.78
5.3.150.0100.05014.78
5.3.140.0070.07714.54
5.3.130.0100.06014.61
5.3.120.0030.07014.55
5.3.110.0130.07014.58
5.3.100.0070.04314.06
5.3.90.0070.07314.12
5.3.80.0070.07714.08
5.3.70.0100.07014.06
5.3.60.0030.05713.90
5.3.50.0030.06314.01
5.3.40.0000.07013.94
5.3.30.0070.06313.95
5.3.20.0200.04313.77
5.3.10.0030.05713.70
5.3.00.0000.08313.63
5.2.170.0030.04711.22
5.2.160.0030.04011.15
5.2.150.0070.04011.18
5.2.140.0070.06011.16
5.2.130.0070.05711.17
5.2.120.0100.05011.11
5.2.110.0070.05311.16
5.2.100.0200.05011.00
5.2.90.0100.06010.95
5.2.80.0000.07011.09
5.2.70.0100.05311.19
5.2.60.0070.04311.03
5.2.50.0100.05711.09
5.2.40.0030.05711.09
5.2.30.0130.05011.00
5.2.20.0000.06710.96
5.2.10.0100.05010.93
5.2.00.0000.04310.82
5.1.60.0100.0509.97
5.1.50.0130.03010.08
5.1.40.0070.0239.93
5.1.30.0070.04310.54
5.1.20.0070.03310.57
5.1.10.0070.05310.07
5.1.00.0030.02310.18
5.0.50.0100.0308.61
5.0.40.0100.0178.38
5.0.30.0000.0678.24
5.0.20.0030.0208.41
5.0.10.0030.0208.12
5.0.00.0030.0308.20
4.4.90.0030.0307.73
4.4.80.0000.0377.73
4.4.70.0100.0177.73
4.4.60.0030.0337.73
4.4.50.0000.0377.73
4.4.40.0030.0537.73
4.4.30.0030.0337.73
4.4.20.0070.0337.73
4.4.10.0030.0307.73
4.4.00.0000.0307.73
4.3.110.0000.0177.73
4.3.100.0070.0177.73
4.3.90.0000.0377.73
4.3.80.0000.0277.73
4.3.70.0000.0307.73
4.3.60.0100.0277.73
4.3.50.0070.0337.73
4.3.40.0030.0507.73
4.3.30.0000.0237.73
4.3.20.0000.0307.73
4.3.10.0030.0207.73
4.3.00.0000.0337.73

preferences:
57.16 ms | 400 KiB | 5 Q