3v4l.org

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

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.0150.00618.75
8.3.50.0140.00621.27
8.3.40.0090.00618.95
8.3.30.0070.01020.34
8.3.20.0040.00420.16
8.3.10.0000.00821.89
8.3.00.0030.00522.44
8.2.180.0070.01117.00
8.2.170.0070.00722.96
8.2.160.0030.01020.29
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0110.00726.16
8.2.120.0080.00019.66
8.2.110.0000.01022.25
8.2.100.0160.00417.91
8.2.90.0000.00819.35
8.2.80.0000.00719.40
8.2.70.0050.00317.75
8.2.60.0080.00017.93
8.2.50.0080.00018.07
8.2.40.0000.00818.26
8.2.30.0040.00418.15
8.2.20.0040.00417.80
8.2.10.0050.00318.02
8.2.00.0040.00417.96
8.1.280.0130.00325.92
8.1.270.0070.00024.66
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0040.00423.88
8.1.230.0040.00720.88
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0000.00917.48
8.1.190.0000.00817.53
8.1.180.0030.00619.26
8.1.170.0080.00018.63
8.1.160.0040.00422.12
8.1.150.0090.00018.79
8.1.140.0000.00717.60
8.1.130.0070.00017.86
8.1.120.0030.00317.63
8.1.110.0040.00417.62
8.1.100.0070.00017.54
8.1.90.0040.00317.62
8.1.80.0000.00717.45
8.1.70.0030.00517.59
8.1.60.0040.00417.63
8.1.50.0070.00017.71
8.1.40.0040.00417.69
8.1.30.0000.00717.68
8.1.20.0040.00417.66
8.1.10.0040.00417.70
8.1.00.0060.00317.64
8.0.300.0070.00018.77
8.0.290.0040.00417.18
8.0.280.0000.00718.35
8.0.270.0070.00017.19
8.0.260.0000.00717.03
8.0.250.0000.00717.20
8.0.240.0060.00317.06
8.0.230.0030.00417.15
8.0.220.0000.00817.00
8.0.210.0000.00717.17
8.0.200.0000.00717.21
8.0.190.0070.00317.06
8.0.180.0000.00817.16
8.0.170.0000.00817.04
8.0.160.0030.00417.09
8.0.150.0030.00717.04
8.0.140.0000.00717.00
8.0.130.0000.00513.50
8.0.120.0000.00716.97
8.0.110.0040.00417.17
8.0.100.0040.00417.15
8.0.90.0050.00217.10
8.0.80.0090.01217.03
8.0.70.0000.00717.10
8.0.60.0050.00316.93
8.0.50.0060.00317.05
8.0.30.0100.00917.23
8.0.20.0130.00717.48
8.0.10.0040.00417.20
8.0.00.0120.00816.89
7.4.330.0070.00015.00
7.4.320.0000.00616.76
7.4.300.0030.00316.77
7.4.290.0070.00016.57
7.4.280.0070.00016.74
7.4.270.0000.00716.67
7.4.260.0040.00416.82
7.4.250.0050.00216.83
7.4.240.0000.00816.84
7.4.230.0070.00016.72
7.4.220.0130.00716.76
7.4.210.0080.01016.72
7.4.200.0070.00016.71
7.4.190.0080.00016.63
7.4.160.0110.00616.69
7.4.150.0150.00317.40
7.4.140.0130.00817.86
7.4.130.0110.00916.73
7.4.120.0040.01416.82
7.4.110.0100.01016.76
7.4.100.0120.00816.85
7.4.90.0100.01316.64
7.4.80.0060.01219.39
7.4.70.0140.00716.81
7.4.60.0170.00716.74
7.4.50.0000.00816.63
7.4.40.0000.01922.77
7.4.30.0130.01016.70
7.4.00.0030.00715.26
7.3.330.0000.00513.59
7.3.320.0030.00313.64
7.3.310.0000.00716.52
7.3.300.0030.00316.59
7.3.290.0080.00516.52
7.3.280.0110.00516.52
7.3.270.0100.00617.40
7.3.260.0120.00616.46
7.3.250.0100.00716.53
7.3.240.0170.00316.50
7.3.230.0070.01116.77
7.3.210.0070.01016.70
7.3.200.0030.01319.39
7.3.190.0100.00716.50
7.3.180.0060.00916.66
7.3.170.0090.00616.69
7.3.160.0160.00016.55
7.3.120.0070.01014.89
7.2.330.0060.01916.67
7.2.320.0110.01116.66
7.2.310.0040.01316.84
7.2.300.0060.01016.94
7.2.290.0030.01416.89
7.2.60.0070.00717.04
7.1.200.0040.01116.03
7.1.70.0180.01417.29
7.1.60.0070.01719.43
7.1.50.0060.01017.09
7.1.00.0070.05322.36
7.0.200.0040.00416.93
7.0.140.0030.07322.07
7.0.60.0130.06319.91
7.0.50.0000.05717.89
7.0.40.0130.06720.28
7.0.30.0470.05020.23
7.0.20.0270.06020.20
7.0.10.0030.06020.23
7.0.00.0100.07020.13
5.6.280.0100.06720.93
5.6.210.0100.06020.57
5.6.200.0130.08018.16
5.6.190.0030.05020.48
5.6.180.3200.04020.33
5.6.170.0200.04020.62
5.6.160.0000.04720.52
5.6.150.0030.05018.28
5.6.140.0070.05018.18
5.6.130.0130.03018.21
5.6.120.0100.08321.01
5.6.110.0170.07321.16
5.6.100.0100.08020.99
5.6.90.0000.06321.01
5.6.80.0100.07720.52
5.6.70.0270.07020.52
5.5.350.0300.08020.43
5.5.340.0070.03717.98
5.5.330.0070.07020.40
5.5.320.0500.06720.33
5.5.310.0230.04020.34
5.5.300.0100.08318.09
5.5.290.0070.04018.08
5.5.280.0070.06320.86
5.5.270.0070.04320.89
5.5.260.0170.07320.87
5.5.250.0030.08020.59
5.5.240.0130.04320.36
5.4.450.0870.06319.29
5.4.440.0300.06319.61
5.4.430.0130.06019.58
5.4.420.0100.05319.60
5.4.410.0070.06319.32
5.4.400.0370.04318.62
5.4.390.0330.06318.80
5.4.380.0300.04718.57
5.4.370.0130.05018.57
5.4.360.0030.05718.75
5.4.350.0060.03512.03
5.4.340.0100.04512.03
5.4.320.0080.03512.52
5.4.310.0050.03912.51
5.4.300.0060.04312.51
5.4.290.0060.03912.50
5.4.280.0070.03412.40
5.4.270.0030.04012.41
5.4.260.0060.03712.40
5.4.250.0170.04318.83
5.4.240.0130.04718.99
5.4.230.0100.06718.95
5.4.220.0100.05318.80
5.4.210.0200.04018.83
5.4.200.0100.05018.94
5.4.190.0170.04019.01
5.4.180.0170.04318.66
5.4.170.0030.05318.80
5.4.160.0130.07018.79
5.4.150.0070.05319.00
5.4.140.0070.05016.56
5.4.130.0100.04716.64
5.4.120.0070.05016.64
5.4.110.0130.04316.38
5.4.100.0070.05016.67
5.4.90.0070.06316.71
5.4.80.0130.06716.57
5.4.70.0000.07016.44
5.4.60.0070.05016.47
5.4.50.0070.04716.39
5.4.40.0030.05016.62
5.4.30.0030.05016.54
5.4.20.0100.04716.30
5.4.10.0200.06016.44
5.4.00.0100.06716.00
5.3.290.0070.03812.80
5.3.280.0070.06014.52
5.3.270.0070.06314.79
5.3.260.0070.05314.62
5.3.250.0130.07314.63
5.3.240.0100.05014.59
5.3.230.0000.05714.69
5.3.220.0030.05314.59
5.3.210.0070.05314.41
5.3.200.0100.07014.56
5.3.190.0030.05314.71
5.3.180.0100.04314.57
5.3.170.0100.05014.64
5.3.160.0300.04714.75
5.3.150.0100.04714.40
5.3.140.0100.04714.65
5.3.130.0100.05314.77
5.3.120.0200.05314.73
5.3.110.0070.08014.54
5.3.100.0100.04714.22
5.3.90.0030.07714.01
5.3.80.0070.04714.18
5.3.70.0070.07014.21
5.3.60.0100.05014.20
5.3.50.0000.05314.12
5.3.40.0070.05714.18
5.3.30.0000.05713.82
5.3.20.0070.04713.78
5.3.10.0100.04313.73
5.3.00.0100.04313.71
5.2.170.0000.04310.97
5.2.160.0000.05711.24
5.2.150.0070.04710.98
5.2.140.0070.04011.05
5.2.130.0100.03711.17
5.2.120.0100.05011.10
5.2.110.0070.03711.18
5.2.100.0100.04011.11
5.2.90.0030.04011.18
5.2.80.0070.04311.18
5.2.70.0100.05011.15
5.2.60.0000.04711.13
5.2.50.0000.04710.99
5.2.40.0030.05711.22
5.2.30.0000.04311.14
5.2.20.0070.03711.12
5.2.10.0000.04310.95
5.2.00.0070.04310.57
5.1.60.0030.04710.04
5.1.50.0000.0379.98
5.1.40.0170.02310.18
5.1.30.0070.03710.32
5.1.20.0000.04010.43
5.1.10.0000.03710.08
5.1.00.0000.03710.12
5.0.50.0030.0378.34
5.0.40.0070.0378.39
5.0.30.0070.0478.23
5.0.20.0030.0278.26
5.0.10.0100.0208.12
5.0.00.0000.0438.15
4.4.90.0030.0237.32
4.4.80.0100.0137.32
4.4.70.0000.0237.32
4.4.60.0100.0137.32
4.4.50.0000.0237.32
4.4.40.0000.0377.32
4.4.30.0000.0237.32
4.4.20.0030.0207.32
4.4.10.0100.0137.32
4.4.00.0000.0337.32
4.3.110.0030.0307.32
4.3.100.0070.0177.32
4.3.90.0000.0237.32
4.3.80.0000.0337.32
4.3.70.0030.0177.32
4.3.60.0070.0177.32
4.3.50.0030.0207.32
4.3.40.0000.0337.32
4.3.30.0000.0237.32
4.3.20.0000.0237.32
4.3.10.0000.0237.32
4.3.00.0130.0207.23

preferences:
40.87 ms | 401 KiB | 5 Q