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+~', 'static::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.01018.55
8.3.50.0110.00722.14
8.3.40.0110.00419.22
8.3.30.0110.00719.19
8.3.20.0080.00020.21
8.3.10.0070.00021.95
8.3.00.0000.00722.57
8.2.180.0120.00616.59
8.2.170.0110.00422.96
8.2.160.0090.00621.05
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00017.88
8.2.110.0090.00022.30
8.2.100.0080.00417.97
8.2.90.0000.00819.14
8.2.80.0000.00818.05
8.2.70.0050.00417.88
8.2.60.0040.00418.03
8.2.50.0000.00818.07
8.2.40.0000.00818.22
8.2.30.0050.00318.08
8.2.20.0060.00317.87
8.2.10.0040.00419.54
8.2.00.0040.00417.80
8.1.280.0060.01525.92
8.1.270.0070.00723.83
8.1.260.0090.00626.35
8.1.250.0040.00428.09
8.1.240.0050.00523.98
8.1.230.0070.00419.16
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0060.00317.35
8.1.190.0040.00417.41
8.1.180.0000.00818.10
8.1.170.0000.00818.58
8.1.160.0030.00622.00
8.1.150.0000.00718.59
8.1.140.0040.00417.44
8.1.130.0000.00717.81
8.1.120.0040.00417.52
8.1.110.0040.00417.52
8.1.100.0000.00717.51
8.1.90.0060.00317.39
8.1.80.0000.00717.48
8.1.70.0030.00317.45
8.1.60.0080.00017.61
8.1.50.0040.00417.65
8.1.40.0050.00317.55
8.1.30.0030.00517.75
8.1.20.0080.00017.77
8.1.10.0000.00717.59
8.1.00.0050.00317.54
8.0.300.0070.00018.77
8.0.290.0040.00417.17
8.0.280.0040.00418.46
8.0.270.0030.00317.28
8.0.260.0030.00316.96
8.0.250.0030.00317.00
8.0.240.0000.00717.07
8.0.230.0040.00417.10
8.0.220.0000.00717.00
8.0.210.0050.00216.82
8.0.200.0000.00616.98
8.0.190.0040.00417.00
8.0.180.0000.00716.89
8.0.170.0030.00617.01
8.0.160.0000.00817.07
8.0.150.0000.00816.77
8.0.140.0040.00416.86
8.0.130.0000.00613.35
8.0.120.0000.00816.77
8.0.110.0000.00816.91
8.0.100.0000.00716.87
8.0.90.0000.00716.98
8.0.80.0090.00916.91
8.0.70.0050.00317.01
8.0.60.0000.00816.93
8.0.50.0080.00016.86
8.0.30.0100.01117.08
8.0.20.0160.00417.50
8.0.10.0040.00416.91
8.0.00.0140.00316.92
7.4.330.0030.00315.00
7.4.320.0060.00016.68
7.4.300.0000.00716.75
7.4.290.0070.00016.75
7.4.280.0030.00316.70
7.4.270.0060.00316.65
7.4.260.0040.00416.50
7.4.250.0040.00416.76
7.4.240.0000.00716.68
7.4.230.0000.00716.86
7.4.220.0090.00916.70
7.4.210.0060.00916.71
7.4.200.0040.00416.76
7.4.190.0050.00316.56
7.4.160.0130.00316.73
7.4.150.0120.00617.40
7.4.140.0100.00717.86
7.4.130.0160.00416.60
7.4.120.0070.01016.64
7.4.110.0070.01116.57
7.4.100.0070.01116.49
7.4.90.0160.00016.66
7.4.80.0120.01116.66
7.4.70.0060.01016.63
7.4.60.0120.00316.76
7.4.50.0000.00416.70
7.4.40.0030.01422.77
7.4.30.0120.00316.66
7.4.00.0090.00915.01
7.3.330.0030.00313.33
7.3.320.0030.00313.36
7.3.310.0030.00316.39
7.3.300.0070.00016.51
7.3.290.0090.00916.50
7.3.280.0110.00916.46
7.3.270.0140.01017.40
7.3.260.0070.01416.71
7.3.250.0100.01016.62
7.3.240.0030.01316.67
7.3.230.0060.01116.68
7.3.210.0090.00916.46
7.3.200.0140.00419.39
7.3.190.0080.00816.48
7.3.180.0080.00816.33
7.3.170.0060.01116.66
7.3.160.0060.01016.53
7.3.120.0100.00715.14
7.3.10.0000.01316.55
7.3.00.0070.00416.70
7.2.330.0040.01416.70
7.2.320.0090.00916.78
7.2.310.0100.00916.79
7.2.300.0100.00616.86
7.2.290.0150.00316.76
7.2.130.0050.01016.85
7.2.120.0040.00716.87
7.2.110.0020.01116.83
7.2.100.0060.00516.91
7.2.90.0020.01217.04
7.2.80.0050.00716.98
7.2.70.0080.00717.05
7.2.60.0020.01316.84
7.2.50.0110.00316.89
7.2.40.0050.00917.00
7.2.30.0040.00917.10
7.2.20.0060.00717.10
7.2.10.0050.00517.08
7.2.00.0080.00617.76
7.1.250.0030.00815.74
7.1.240.0100.00716.14
7.1.230.0000.01116.02
7.1.220.0060.00615.86
7.1.210.0030.01315.79
7.1.200.0080.00515.91
7.1.190.0030.00715.61
7.1.180.0030.01316.04
7.1.170.0070.00715.93
7.1.160.0060.00315.90
7.1.150.0080.00815.96
7.1.140.0000.01715.91
7.1.130.0130.00616.11
7.1.120.0130.00615.88
7.1.110.0120.00315.99
7.1.100.0100.00517.28
7.1.90.0100.00315.99
7.1.80.0140.00015.96
7.1.70.0060.00916.66
7.1.60.0100.01018.01
7.1.50.0060.01316.54
7.1.40.0120.00416.04
7.1.30.0090.00316.04
7.1.20.0040.01216.01
7.1.10.0100.00715.84
7.1.00.0040.04419.21
7.0.330.0040.01115.55
7.0.320.0100.00615.45
7.0.310.0070.00715.44
7.0.300.0040.01115.44
7.0.290.0140.00315.52
7.0.280.0000.01315.39
7.0.270.0110.00315.45
7.0.260.0130.00315.62
7.0.250.0090.00915.52
7.0.240.0130.00615.58
7.0.230.0060.00615.30
7.0.220.0100.00715.72
7.0.210.0100.00715.31
7.0.200.0110.00616.23
7.0.190.0140.00015.21
7.0.180.0100.00715.67
7.0.170.0080.00315.53
7.0.160.0080.00815.45
7.0.150.0040.01015.51
7.0.140.0040.04018.80
7.0.130.0070.00415.47
7.0.120.0070.00415.14
7.0.110.0110.00315.38
7.0.100.0070.00715.72
7.0.90.0060.00615.39
7.0.80.0110.00415.69
7.0.70.0060.04118.63
7.0.60.0050.04518.67
7.0.50.0050.04518.91
7.0.40.0080.04516.73
7.0.30.0070.03716.78
7.0.20.0020.03816.83
7.0.10.0070.03916.82
7.0.00.0050.04616.91
5.6.380.0000.01214.32
5.6.370.0070.00714.53
5.6.360.0060.00614.34
5.6.350.0090.00614.09
5.6.340.0030.00914.12
5.6.330.0070.00714.39
5.6.320.0090.00614.30
5.6.310.0000.01314.45
5.6.300.0040.01114.60
5.6.290.0070.00414.54
5.6.280.0070.03817.72
5.6.270.0030.00914.05
5.6.260.0040.00814.36
5.6.250.0000.01214.31
5.6.240.0060.00614.63
5.6.230.0030.00714.14
5.6.220.0040.04517.41
5.6.210.0080.04317.61
5.6.200.0070.04717.60
5.6.190.0090.04417.61
5.6.180.0090.04317.64
5.6.170.0050.04717.57
5.6.160.0060.03317.76
5.6.150.0040.04517.63
5.6.140.0040.04617.70
5.6.130.0030.04417.60
5.6.120.0070.02917.63
5.6.110.0090.03817.56
5.6.100.0050.04517.60
5.6.90.0040.03617.46
5.6.80.0040.03717.41
5.6.70.0130.02517.39
5.6.60.0000.04217.26
5.6.50.0050.04317.35
5.6.40.0000.03017.12
5.6.30.0080.03417.25
5.6.20.0040.04317.20
5.6.10.0050.04717.14
5.6.00.0100.03917.33
5.5.380.0000.00711.14
5.5.370.0040.00411.07
5.5.360.0050.02815.93
5.5.350.0030.04215.87
5.5.340.0040.04515.95
5.5.330.0060.04316.03
5.5.320.0090.04615.99
5.5.310.0050.04016.21
5.5.300.0070.04515.83
5.5.290.0100.03115.98
5.5.280.0040.04615.94
5.5.270.0030.04515.91
5.5.260.0100.04116.13
5.5.250.0050.04215.73
5.5.240.0030.04315.44
5.5.230.0070.04215.87
5.5.220.0100.03815.60
5.5.210.0030.04315.67
5.5.200.0070.03515.66
5.5.190.0050.04215.69
5.5.180.0030.03815.63
5.5.170.0090.00310.89
5.5.160.0030.04215.52
5.5.150.0050.04615.76
5.5.140.0070.04115.65
5.5.130.0040.04115.69
5.5.120.0070.04215.43
5.5.110.0090.04215.52
5.5.100.0030.04815.44
5.5.90.0030.04215.42
5.5.80.0080.04115.63
5.5.70.0070.03815.45
5.5.60.0030.04615.71
5.5.50.0080.03015.70
5.5.40.0100.03015.53
5.5.30.0080.03715.58
5.5.20.0070.04215.55
5.5.10.0030.03015.72
5.5.00.0040.03415.43
5.4.450.0030.02815.23
5.4.440.0110.03715.34
5.4.430.0030.04115.18
5.4.420.0030.03315.30
5.4.410.0040.03415.18
5.4.400.0020.04515.23
5.4.390.0040.04415.16
5.4.380.0020.03214.94
5.4.370.0030.02914.86
5.4.360.0050.04415.00
5.4.350.0090.03515.22
5.4.340.0040.03415.02
5.4.330.0000.00610.92
5.4.320.0020.03415.18
5.4.310.0030.04515.08
5.4.300.0030.04214.95
5.4.290.0050.04014.94
5.4.280.0000.04215.04
5.4.270.0050.04014.97
5.4.260.0010.04415.01
5.4.250.0080.03814.83
5.4.240.0070.03914.96
5.4.230.0000.04514.98
5.4.220.0070.02214.91
5.4.210.0050.03914.86
5.4.200.0050.04114.91
5.4.190.0030.03315.11
5.4.180.0100.03315.07
5.4.170.0080.03714.86
5.4.160.0020.04114.95
5.4.150.0000.03215.03
5.4.140.0030.04313.68
5.4.130.0030.03913.51
5.4.120.0000.04213.56
5.4.110.0070.04013.81
5.4.100.0070.03813.78
5.4.90.0050.02713.54
5.4.80.0070.03513.75
5.4.70.0030.04113.78
5.4.60.0030.04313.79
5.4.50.0030.03713.54
5.4.40.0080.02713.82
5.4.30.0030.03713.72
5.4.20.0040.03413.80
5.4.10.0020.04213.65
5.4.00.0020.03413.39
5.3.290.0070.03912.71
5.3.280.0000.03612.60
5.3.270.0050.03812.47
5.3.260.0030.02812.58
5.3.250.0020.04212.61
5.3.240.0030.03812.58
5.3.230.0020.04212.54
5.3.220.0050.02812.60
5.3.210.0080.03912.43
5.3.200.0050.04412.61
5.3.190.0050.03912.67
5.3.180.0060.03312.52
5.3.170.0070.03712.57
5.3.160.0030.04112.69
5.3.150.0090.03512.52
5.3.140.0010.04412.64
5.3.130.0050.03712.51
5.3.120.0030.04212.57
5.3.110.0030.04512.62
5.3.100.0000.04112.42
5.3.90.0070.03012.17
5.3.80.0060.03712.15
5.3.70.0060.04012.16
5.3.60.0080.03812.29
5.3.50.0020.04012.20
5.3.40.0040.03012.29
5.3.30.0020.04212.20
5.3.20.0000.03912.18
5.3.10.0070.02212.10
5.3.00.0030.02211.91
5.2.170.0030.03310.84
5.2.160.0030.03310.98
5.2.150.0000.03610.94
5.2.140.0070.02810.94
5.2.130.0000.02910.94
5.2.120.0040.02110.89
5.2.110.0070.02810.84
5.2.100.0000.02410.84
5.2.90.0020.01610.88
5.2.80.0000.02510.85
5.2.70.0030.03310.84
5.2.60.0030.03010.84
5.2.50.0020.03510.84
5.2.40.0050.03110.84
5.2.30.0050.03310.89
5.2.20.0010.03410.84
5.2.10.0000.03910.84
5.2.00.0020.03210.84
5.1.60.0000.03110.84
5.1.50.0020.03010.84
5.1.40.0000.02610.84
5.1.30.0020.03010.84
5.1.20.0050.02310.84
5.1.10.0050.02810.84
5.1.00.0000.03310.84
5.0.50.0050.01510.84
5.0.40.0020.02310.84
5.0.30.0050.02710.84
5.0.20.0060.02010.84
5.0.10.0060.01810.84
5.0.00.0010.03510.84
4.4.90.0000.02310.84
4.4.80.0000.02010.84
4.4.70.0030.01510.84
4.4.60.0000.02110.84
4.4.50.0020.01710.84
4.4.40.0000.02910.84
4.4.30.0050.01610.84
4.4.20.0030.01710.84
4.4.10.0050.01310.84
4.4.00.0050.02810.84
4.3.110.0000.02310.84
4.3.100.0020.01810.84
4.3.90.0030.01510.84
4.3.80.0050.02510.84
4.3.70.0000.01910.84
4.3.60.0030.01710.84
4.3.50.0000.02010.84
4.3.40.0020.03010.84
4.3.30.0040.01510.84
4.3.20.0010.02010.84
4.3.10.0010.02010.84
4.3.00.0030.01810.84

preferences:
42.5 ms | 401 KiB | 5 Q