3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CString { public static function fun3($str){ return strtoupper($str); } public function fun4($str){ return strtoupper($str); } } class Test { public function fun1(){ static $var = 1; return $var++; } public function fun2(){ echo preg_replace_callback('/.*/', function($find){return $this->fun1().$find[0];}, 'test'); } } $t = new Test; $t->fun2(); echo 3;

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.55
8.3.50.0060.01021.21
8.3.40.0070.01418.98
8.3.30.0080.00620.39
8.3.20.0040.00420.38
8.3.10.0030.00621.96
8.3.00.0040.00422.52
8.2.180.0120.00416.75
8.2.170.0040.01122.96
8.2.160.0110.00420.57
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0050.00319.79
8.2.110.0090.00022.34
8.2.100.0090.00317.97
8.2.90.0000.00819.23
8.2.80.0030.00519.31
8.2.70.0050.00317.75
8.2.60.0040.00717.79
8.2.50.0050.00318.07
8.2.40.0070.00018.34
8.2.30.0000.00818.06
8.2.20.0030.00517.79
8.2.10.0030.00518.02
8.2.00.0000.00818.02
8.1.280.0110.00725.92
8.1.270.0080.00024.66
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0070.00323.89
8.1.230.0080.00419.17
8.1.220.0040.00417.78
8.1.210.0080.00018.77
8.1.200.0090.00017.38
8.1.190.0000.00817.53
8.1.180.0100.00318.10
8.1.170.0030.00518.64
8.1.160.0070.00022.04
8.1.150.0030.00618.80
8.1.140.0050.00317.54
8.1.130.0070.00017.87
8.1.120.0000.00717.48
8.1.110.0030.00617.66
8.1.100.0000.00717.57
8.1.90.0000.00817.63
8.1.80.0000.00717.67
8.1.70.0000.00617.48
8.1.60.0080.00017.73
8.1.50.0050.00217.53
8.1.40.0000.00917.66
8.1.30.0030.00517.75
8.1.20.0040.00417.80
8.1.10.0000.00817.61
8.1.00.0050.00317.62
8.0.300.0040.00418.77
8.0.290.0080.00017.18
8.0.280.0070.00018.47
8.0.270.0030.00317.19
8.0.260.0000.00616.89
8.0.250.0070.00017.07
8.0.240.0000.00817.18
8.0.230.0000.00717.23
8.0.220.0050.00317.01
8.0.210.0030.00317.09
8.0.200.0030.00317.16
8.0.190.0070.00417.05
8.0.180.0050.00317.16
8.0.170.0080.00017.09
8.0.160.0070.00017.14
8.0.150.0040.00417.15
8.0.140.0080.00016.91
8.0.130.0030.00313.52
8.0.120.0040.00417.07
8.0.110.0040.00417.17
8.0.100.0040.00417.11
8.0.90.0040.00417.05
8.0.80.0040.01117.00
8.0.70.0050.00317.02
8.0.60.0000.00717.17
8.0.50.0050.00217.00
8.0.30.0090.01117.42
8.0.20.0120.00617.44
8.0.10.0030.00517.05
8.0.00.0070.01417.05
7.4.330.0060.00015.00
7.4.320.0000.00716.66
7.4.300.0030.00316.87
7.4.290.0030.00316.72
7.4.280.0070.00016.58
7.4.270.0030.00616.73
7.4.260.0070.00016.75
7.4.250.0000.00716.68
7.4.240.0030.00316.73
7.4.230.0030.00316.81
7.4.220.0190.00316.86
7.4.210.0070.00816.82
7.4.200.0000.00716.77
7.4.190.0070.00016.97
7.4.160.0120.00416.81
7.4.150.0060.01217.40
7.4.140.0070.01517.86
7.4.130.0070.01016.81
7.4.120.0050.01216.68
7.4.110.0070.01016.57
7.4.100.0120.00916.62
7.4.90.0110.00716.91
7.4.80.0110.01119.39
7.4.70.0170.00016.86
7.4.60.0070.01416.76
7.4.50.0030.00616.70
7.4.40.0090.00322.77
7.4.30.0090.01216.93
7.4.00.0090.00615.19
7.3.330.0000.00513.41
7.3.320.0030.00313.44
7.3.310.0030.00316.45
7.3.300.0000.00716.63
7.3.290.0070.00716.53
7.3.280.0090.01016.49
7.3.270.0080.00817.40
7.3.260.0160.00816.73
7.3.250.0080.01116.71
7.3.240.0060.01016.69
7.3.230.0070.01016.54
7.3.210.0090.00916.48
7.3.200.0100.01019.39
7.3.190.0150.00716.51
7.3.180.0060.00916.65
7.3.170.0060.01016.74
7.3.160.0130.00316.70
7.3.120.0110.00615.01
7.3.110.0070.01114.87
7.3.100.0070.00714.91
7.3.90.0040.00414.79
7.3.80.0060.00914.92
7.3.70.0040.01115.00
7.3.60.0060.00915.10
7.3.50.0000.00914.82
7.3.40.0070.00714.55
7.3.30.0070.00415.18
7.3.20.0060.00916.91
7.3.10.0060.00616.55
7.3.00.0100.00016.74
7.2.330.0120.00616.77
7.2.320.0120.01216.83
7.2.310.0100.00716.78
7.2.300.0080.01117.07
7.2.290.0130.00317.05
7.2.250.0000.01915.34
7.2.240.0090.00915.45
7.2.230.0000.01315.07
7.2.220.0090.00015.05
7.2.210.0110.00715.39
7.2.200.0130.00315.19
7.2.190.0140.00415.31
7.2.180.0090.00615.05
7.2.170.0000.01415.26
7.2.160.0080.00815.13
7.2.150.0050.01017.13
7.2.140.0070.00717.31
7.2.130.0130.00617.23
7.2.120.0040.01116.88
7.2.110.0120.00316.82
7.2.100.0000.01017.23
7.2.90.0070.01017.29
7.2.80.0120.00617.23
7.2.70.0060.00916.98
7.2.60.0100.00317.01
7.2.50.0070.00717.14
7.2.40.0070.00717.01
7.2.30.0060.01216.96
7.2.20.0080.00817.06
7.2.10.0060.00917.00
7.2.00.0100.00316.97
7.1.330.0040.01115.69
7.1.320.0100.00715.75
7.1.310.0030.01216.16
7.1.300.0030.01315.82
7.1.290.0040.01216.06
7.1.280.0040.01115.89
7.1.270.0120.00016.14
7.1.260.0000.01516.08
7.1.250.0060.00916.11
7.1.200.0100.00315.86
7.1.70.0100.00317.27
7.1.60.0160.01019.43
7.1.50.0070.01317.25
7.1.00.0030.07722.41
7.0.200.0060.00316.91
7.0.140.0170.06322.15
7.0.60.0070.07320.01
7.0.50.0030.08017.88
7.0.40.0000.04720.32
7.0.30.0200.04320.26
7.0.20.0270.05320.22
7.0.10.0430.06320.09
7.0.00.0070.09020.21
5.6.280.0030.07321.05
5.6.210.0030.08320.70
5.6.200.0070.07718.19
5.6.190.0030.04720.32
5.6.180.0330.07020.49
5.6.170.0470.06720.44
5.6.160.0170.08020.57
5.6.150.0170.06718.14
5.6.140.0030.08318.12
5.6.130.0030.06018.14
5.6.120.0100.03721.04
5.6.110.0070.08721.04
5.6.100.0100.08021.09
5.6.90.0070.07720.98
5.6.80.0100.06320.40
5.5.350.0070.08320.39
5.5.340.0100.08017.95
5.5.330.0200.07020.35
5.5.320.0400.06020.36
5.5.310.0230.06020.19
5.5.300.0100.07317.98
5.5.290.0030.04017.94
5.5.280.0030.04320.68
5.5.270.0030.05320.87
5.5.260.0030.04320.90
5.5.250.0070.08320.48
5.5.240.0130.04720.38
5.4.450.0970.04019.17
5.4.440.0630.06319.57
5.4.430.0600.06019.47
5.4.420.0930.04019.46
5.4.410.0570.06019.04
5.4.400.0300.05318.85
5.4.390.0570.06318.73
5.4.380.0200.06318.53
5.4.370.0170.05018.79
5.4.360.0270.04318.49
5.4.350.0100.04412.03
5.4.340.0060.04812.02
5.4.320.0080.03912.51
5.4.310.0050.04412.51
5.4.300.0070.03612.52
5.4.290.0080.03912.50
5.4.280.0050.03612.40
5.4.270.0070.03712.40
5.4.260.0080.03512.40
5.4.250.0100.05018.66
5.4.240.0170.04019.10
5.4.230.0070.06018.97
5.4.220.0100.05018.75
5.4.210.0130.04719.00
5.4.200.0100.05018.95
5.4.190.0100.06718.77
5.4.180.0100.04718.75
5.4.170.0070.05719.02
5.4.160.0030.06019.09
5.4.150.0000.06019.02
5.4.140.0070.05016.45
5.4.130.0000.07316.59
5.4.120.0130.04316.46
5.4.110.0200.04716.48
5.4.100.0100.05016.39
5.4.90.0130.05316.43
5.4.80.0100.05716.70
5.4.70.0100.05016.45
5.4.60.0100.04716.49
5.4.50.0100.04716.45
5.4.40.0170.05316.45
5.4.30.0100.06316.50
5.4.20.0170.04016.52
5.4.10.0170.05716.62
5.4.00.0100.06716.03
5.3.290.0010.04412.80
5.3.280.0070.05014.77
5.3.270.0100.05014.71
5.3.260.0200.04314.59
5.3.250.0100.05014.84
5.3.240.0070.05014.78
5.3.230.0070.05014.44
5.3.220.0070.05014.66
5.3.210.0070.05714.75
5.3.200.0130.04714.55
5.3.190.0100.07014.66
5.3.180.0100.04714.58
5.3.170.0100.05014.55
5.3.160.0130.04314.59
5.3.150.0170.04014.80
5.3.140.0100.05014.66
5.3.130.0100.05314.53
5.3.120.0100.05014.39
5.3.110.0130.04714.55
5.3.100.0100.05314.05
5.3.90.0130.04714.11
5.3.80.0130.04314.10
5.3.70.0100.05014.11
5.3.60.0130.04714.01
5.3.50.0030.05014.05
5.3.40.0130.04314.05
5.3.30.0200.03713.89
5.3.20.0070.05013.69
5.3.10.0100.06713.73
5.3.00.0130.04313.55
5.2.170.0030.04311.23
5.2.160.0070.03710.98
5.2.150.0030.04311.22
5.2.140.0000.04311.21
5.2.130.0030.04011.19
5.2.120.0070.03711.29
5.2.110.0000.04311.21
5.2.100.0100.05011.08
5.2.90.0000.04311.11
5.2.80.0030.04311.17
5.2.70.0000.04711.00
5.2.60.0030.04011.14
5.2.50.0100.03310.85
5.2.40.0100.03311.16
5.2.30.0030.04011.16
5.2.20.0070.04710.95
5.2.10.0070.03710.85
5.2.00.0030.04010.82
5.1.60.0100.02710.07
5.1.50.0100.04310.07
5.1.40.0030.0579.96
5.1.30.0170.04010.18
5.1.20.0170.04710.28
5.1.10.0000.04010.16
5.1.00.0100.04010.18
5.0.50.0070.0378.75
5.0.40.0070.0308.46
5.0.30.0030.0538.07
5.0.20.0000.0308.17
5.0.10.0030.0278.15
5.0.00.0070.0378.15
4.4.90.0070.0177.24
4.4.80.0030.0207.24
4.4.70.0070.0177.24
4.4.60.0000.0237.24
4.4.50.0030.0207.24
4.4.40.0000.0377.24
4.4.30.0000.0237.24
4.4.20.0030.0237.24
4.4.10.0030.0207.24
4.4.00.0030.0437.24
4.3.110.0000.0307.24
4.3.100.0030.0207.24
4.3.90.0000.0237.24
4.3.80.0000.0337.24
4.3.70.0030.0177.24
4.3.60.0070.0177.24
4.3.50.0030.0277.24
4.3.40.0030.0307.24
4.3.30.0070.0177.24
4.3.20.0000.0237.24
4.3.10.0000.0237.24
4.3.00.0070.0237.63

preferences:
40.02 ms | 401 KiB | 5 Q