3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo Module::work('hello world.'), "\n"; echo MyModule::work('hello world.'); abstract class Module { protected 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(static::$mask, $matches[0]); } } abstract class MyModule extends Module { protected static $mask = '{{{%s}}}'; protected static function xreplace($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.0070.01018.55
8.3.50.0110.00817.54
8.3.40.0080.00818.91
8.3.30.0090.00618.96
8.3.20.0090.00018.85
8.3.10.0100.01018.85
8.3.00.0000.00819.75
8.2.180.0070.01316.75
8.2.170.0090.00622.96
8.2.160.0130.00619.07
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0050.00226.16
8.2.120.0080.00021.25
8.2.110.0090.00020.52
8.2.100.0040.00818.03
8.2.90.0000.00818.00
8.2.80.0040.00419.04
8.2.70.0060.00617.49
8.2.60.0030.00518.05
8.2.50.0000.00818.07
8.2.40.0050.00319.47
8.2.30.0060.00317.91
8.2.20.0030.00717.84
8.2.10.0040.00417.77
8.2.00.0040.00417.86
8.1.280.0070.00725.92
8.1.270.0030.00623.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0100.00020.79
8.1.230.0030.00717.83
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0000.00917.48
8.1.190.0080.00017.35
8.1.180.0080.00018.10
8.1.170.0040.00418.94
8.1.160.0000.00719.02
8.1.150.0070.00018.51
8.1.140.0000.00717.48
8.1.130.0050.00219.17
8.1.120.0000.00717.49
8.1.110.0050.00317.46
8.1.100.0050.00217.48
8.1.90.0040.00417.55
8.1.80.0030.00317.52
8.1.70.0030.00317.44
8.1.60.0000.00717.66
8.1.50.0040.00417.44
8.1.40.0000.00817.58
8.1.30.0060.00317.76
8.1.20.0000.00817.70
8.1.10.0040.00417.68
8.1.00.0040.00717.61
8.0.300.0060.00318.77
8.0.290.0040.00416.88
8.0.280.0030.00318.64
8.0.270.0000.00717.32
8.0.260.0070.00017.01
8.0.250.0070.00017.01
8.0.240.0040.00416.98
8.0.230.0030.00317.10
8.0.220.0000.00716.94
8.0.210.0030.00316.99
8.0.200.0070.00017.06
8.0.190.0020.00517.11
8.0.180.0040.00417.04
8.0.170.0000.00816.87
8.0.160.0030.00316.95
8.0.150.0030.00516.74
8.0.140.0060.00616.93
8.0.130.0050.00013.35
8.0.120.0000.00916.77
8.0.110.0040.00416.91
8.0.100.0040.00416.79
8.0.90.0080.00016.79
8.0.80.0030.01316.91
8.0.70.0040.00417.04
8.0.60.0080.00016.81
8.0.50.0000.00716.87
8.0.30.0000.02117.36
8.0.20.0130.00916.95
8.0.10.0000.00717.05
8.0.00.0080.01116.81
7.4.330.0050.00013.06
7.4.320.0060.00016.71
7.4.300.0050.00216.70
7.4.290.0000.00716.72
7.4.280.0000.00916.65
7.4.270.0030.00316.64
7.4.260.0030.00313.43
7.4.250.0030.00616.69
7.4.240.0000.00816.71
7.4.230.0060.00316.78
7.4.220.0150.00416.82
7.4.210.0090.00516.83
7.4.200.0040.00416.86
7.4.190.0040.00416.71
7.4.160.0100.01016.64
7.4.150.0120.00616.53
7.4.140.0100.01016.46
7.4.130.0090.01016.79
7.4.120.0060.01216.54
7.4.110.0100.01616.77
7.4.100.0150.00616.59
7.4.90.0120.00616.78
7.4.80.0050.01316.78
7.4.70.0030.01516.64
7.4.60.0130.00316.95
7.4.50.0080.00016.56
7.4.40.0060.00516.70
7.4.30.0060.01016.74
7.4.00.0000.01815.07
7.3.330.0030.00313.52
7.3.320.0060.00013.45
7.3.310.0000.00716.62
7.3.300.0040.00416.48
7.3.290.0040.01016.43
7.3.280.0090.01116.42
7.3.270.0140.00416.48
7.3.260.0150.00416.45
7.3.250.0110.01416.63
7.3.240.0090.00916.89
7.3.230.0080.00816.74
7.3.210.0060.01216.54
7.3.200.0080.01116.82
7.3.190.0170.00616.71
7.3.180.0080.00816.72
7.3.170.0160.00316.53
7.3.160.0160.00616.48
7.3.120.0060.01014.95
7.2.330.0060.01216.72
7.2.320.0070.01116.81
7.2.310.0070.01116.86
7.2.300.0110.00616.78
7.2.290.0110.00616.81
7.2.00.0060.00919.57
7.1.100.0110.00816.10
7.1.70.0070.00017.38
7.1.60.0000.01417.67
7.1.50.0000.02217.18
7.1.00.0070.04322.34
7.0.200.0000.01816.87
7.0.140.0070.07322.00
7.0.120.0000.06722.09
7.0.60.0070.05019.86
7.0.50.0070.08317.90
7.0.40.0170.03020.25
7.0.30.0200.04720.17
7.0.20.0100.05320.27
7.0.10.0300.04720.17
7.0.00.0000.04320.10
5.6.280.0100.06721.00
5.6.210.0000.04720.48
5.6.200.0070.03718.28
5.6.190.0000.06320.39
5.6.180.0300.03020.41
5.6.170.0300.04020.40
5.6.160.0170.05720.47
5.6.150.0130.05718.29
5.6.140.0070.06018.18
5.6.130.0000.06018.18
5.6.120.0070.05021.14
5.6.110.0070.04321.02
5.6.100.0070.08020.96
5.6.90.0200.07021.01
5.6.80.0070.04320.39
5.6.70.0230.07320.46
5.5.350.0370.06020.43
5.5.340.0030.04018.09
5.5.330.0030.08020.40
5.5.320.0170.04320.40
5.5.310.0270.07020.31
5.5.300.0030.08317.98
5.5.290.0030.08017.99
5.5.280.0130.07020.77
5.5.270.0030.04320.88
5.5.260.0030.04320.90
5.5.250.0070.04020.70
5.5.240.0070.05320.05
5.4.450.0330.04719.45
5.4.440.0500.03719.54
5.4.430.0600.03319.20
5.4.420.0530.04719.48
5.4.410.0100.05319.33
5.4.400.0430.03719.13
5.4.390.0370.06018.83
5.4.380.0600.04018.83
5.4.370.0670.03019.21
5.4.360.0070.03319.02
5.4.350.0200.03319.24
5.4.340.0230.04018.84
5.4.320.0030.04718.95
5.4.310.0070.03718.95
5.4.300.0370.04319.13
5.4.290.0570.03018.86
5.4.280.0730.04018.86
5.4.270.0370.03719.19
5.4.260.0570.04318.86
5.4.250.0230.03719.30
5.4.240.0230.04018.98
5.4.230.0400.04019.31
5.4.220.0200.04019.32
5.4.210.0200.02719.22
5.4.200.0370.03719.06
5.4.190.0200.04318.85
5.4.180.0170.03318.85
5.4.170.0630.03318.82
5.4.160.0100.04319.11
5.4.150.0170.04719.29
5.4.140.0200.04016.41
5.4.130.0330.03716.40
5.4.120.0300.04716.43
5.4.110.0100.03316.59
5.4.100.0770.03016.61
5.4.90.0270.03716.24
5.4.80.0330.03316.55
5.4.70.0330.02716.22
5.4.60.0170.05016.32
5.4.50.0330.03716.55
5.4.40.0100.04016.56
5.4.30.0030.03316.33
5.4.20.0100.03716.55
5.4.10.0000.04716.42
5.4.00.0330.03316.11
5.3.290.0000.05315.28
5.3.280.0070.04315.28
5.3.270.0100.03015.28
5.3.260.0130.04315.28
5.3.250.0470.04315.28
5.3.240.0470.04015.28
5.3.230.0570.04015.28
5.3.220.0400.04015.28
5.3.210.0130.04015.28
5.3.200.0330.04715.28
5.3.190.0270.04015.28
5.3.180.0630.07015.28
5.3.170.0370.03015.28
5.3.160.0430.04315.28
5.3.150.0170.04015.28
5.3.140.0300.04715.28
5.3.130.0100.03015.30
5.3.120.0100.03315.30
5.3.110.0130.03315.30
5.3.100.0370.04715.30
5.3.90.0700.02715.30
5.3.80.0300.04015.30
5.3.70.0430.04015.30
5.3.60.0370.04315.30
5.3.50.0530.04715.30
5.3.40.0170.04315.30
5.3.30.0500.03315.30
5.3.20.0470.03015.30
5.3.10.0400.03015.30
5.3.00.0500.01715.30
5.2.170.0230.03015.30
5.2.160.0200.02715.30
5.2.150.0230.03315.30
5.2.140.0600.03015.30
5.2.130.0270.03315.30
5.2.120.0500.02315.30
5.2.110.0230.02315.30
5.2.100.0400.03315.30
5.2.90.0470.02715.30
5.2.80.0570.03015.30
5.2.70.0370.02315.30
5.2.60.0230.04015.30
5.2.50.0330.02315.30
5.2.40.0330.02015.30
5.2.30.0170.03015.30
5.2.20.0200.03715.30
5.2.10.0400.04015.30
5.2.00.0300.02015.30
5.1.60.0570.02315.30
5.1.50.0300.02015.30
5.1.40.0170.01715.30
5.1.30.0170.03015.30
5.1.20.0200.02715.30
5.1.10.0230.03315.30
5.1.00.0430.01715.30
5.0.50.0270.01715.30
5.0.40.0100.02015.30
5.0.30.0170.03015.30
5.0.20.0230.01715.30
5.0.10.0330.01715.30
5.0.00.0230.03015.30
4.4.90.0300.01315.30
4.4.80.0170.01715.30
4.4.70.0030.02015.30
4.4.60.0170.01015.30
4.4.50.0200.01315.30
4.4.40.0130.02015.30
4.4.30.0070.01715.30
4.4.20.0170.01315.30
4.4.10.0330.01315.30
4.4.00.0230.02315.30
4.3.110.0130.02015.30
4.3.100.0130.01315.30
4.3.90.0200.01715.30
4.3.80.0300.02015.30
4.3.70.0030.02015.30
4.3.60.0030.02015.30
4.3.50.0070.01315.30
4.3.40.0070.03015.30
4.3.30.0100.02015.30
4.3.20.0200.01015.30
4.3.10.0070.01715.30
4.3.00.0070.01715.30

preferences:
52.12 ms | 401 KiB | 5 Q