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(); 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.0070.01118.30
8.3.50.0120.00721.33
8.3.40.0090.00618.91
8.3.30.0100.00720.20
8.3.20.0030.00620.16
8.3.10.0030.00522.09
8.3.00.0080.00022.37
8.2.180.0030.01616.75
8.2.170.0070.00722.96
8.2.160.0110.00420.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00726.16
8.2.120.0150.00319.54
8.2.110.0030.00620.42
8.2.100.0120.00017.91
8.2.90.0030.00519.34
8.2.80.0000.00819.21
8.2.70.0040.00417.62
8.2.60.0040.00418.04
8.2.50.0040.00418.07
8.2.40.0080.00018.34
8.2.30.0040.00418.07
8.2.20.0040.00417.77
8.2.10.0050.00317.85
8.2.00.0000.00817.87
8.1.280.0120.00325.92
8.1.270.0040.00424.66
8.1.260.0050.00326.35
8.1.250.0050.00228.09
8.1.240.0090.00923.73
8.1.230.0100.00022.25
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00617.47
8.1.190.0000.00817.54
8.1.180.0060.00319.48
8.1.170.0090.00018.73
8.1.160.0050.00322.21
8.1.150.0050.00518.70
8.1.140.0000.00717.60
8.1.130.0000.00717.86
8.1.120.0030.00317.52
8.1.110.0060.00317.60
8.1.100.0000.00717.59
8.1.90.0000.00817.61
8.1.80.0000.00717.66
8.1.70.0070.00017.53
8.1.60.0040.00417.74
8.1.50.0000.00917.72
8.1.40.0000.00817.64
8.1.30.0040.00417.72
8.1.20.0040.00417.85
8.1.10.0020.00517.66
8.1.00.0000.00717.67
8.0.300.0050.00218.77
8.0.290.0000.00717.05
8.0.280.0000.00718.34
8.0.270.0000.00716.98
8.0.260.0000.00717.08
8.0.250.0070.00017.13
8.0.240.0040.00417.01
8.0.230.0030.00317.02
8.0.220.0070.00016.95
8.0.210.0030.00317.06
8.0.200.0070.00017.16
8.0.190.0100.00017.07
8.0.180.0030.00616.96
8.0.170.0050.00316.96
8.0.160.0000.00716.91
8.0.150.0000.00717.01
8.0.140.0030.00317.04
8.0.130.0000.00813.56
8.0.120.0000.00816.91
8.0.110.0090.00016.91
8.0.100.0000.00716.92
8.0.90.0040.00416.95
8.0.80.0110.01117.05
8.0.70.0000.00716.98
8.0.60.0000.00717.07
8.0.50.0070.00017.10
8.0.30.0150.00317.23
8.0.20.0100.00817.46
8.0.10.0080.00017.07
8.0.00.0080.01316.86
7.4.330.0060.00015.00
7.4.320.0030.00316.82
7.4.300.0030.00316.72
7.4.290.0080.00016.71
7.4.280.0030.00316.80
7.4.270.0070.00016.77
7.4.260.0000.00716.75
7.4.250.0030.00616.61
7.4.240.0050.00216.82
7.4.230.0000.00716.61
7.4.220.0030.01216.86
7.4.210.0040.01116.76
7.4.200.0000.00816.82
7.4.190.0040.00416.92
7.4.160.0070.01016.72
7.4.150.0030.02017.40
7.4.140.0120.00917.86
7.4.130.0050.01116.77
7.4.120.0150.00516.71
7.4.110.0130.01016.82
7.4.100.0070.01116.74
7.4.90.0120.00616.70
7.4.80.0060.01119.39
7.4.70.0150.00616.73
7.4.60.0100.00716.63
7.4.50.0000.01016.71
7.4.40.0000.01322.77
7.4.30.0100.01116.73
7.4.00.0070.01015.29
7.3.330.0050.00013.58
7.3.320.0060.00013.47
7.3.310.0000.00716.37
7.3.300.0030.00316.49
7.3.290.0090.00516.45
7.3.280.0110.00316.44
7.3.270.0130.00317.40
7.3.260.0080.01116.50
7.3.250.0120.00516.60
7.3.240.0060.01216.47
7.3.230.0100.01416.77
7.3.210.0170.00016.47
7.3.200.0140.00419.39
7.3.190.0160.00616.53
7.3.180.0090.00916.66
7.3.170.0110.00716.45
7.3.160.0030.01716.43
7.3.120.0070.00715.18
7.2.330.0070.01316.79
7.2.320.0090.00916.88
7.2.310.0130.00316.89
7.2.300.0070.01016.65
7.2.290.0060.01217.03
7.2.60.0040.01117.16
7.2.50.0070.00716.97
7.1.200.0150.00515.55
7.1.70.0110.00717.30
7.1.60.0070.01419.43
7.1.50.0090.00616.91
7.1.00.0130.06022.43
7.0.200.0020.00517.05
7.0.140.0000.07722.12
7.0.60.0030.06319.79
7.0.50.0070.07717.87
7.0.40.0070.08020.11
7.0.30.0530.07020.09
7.0.20.0330.08020.06
7.0.10.0000.09020.30
7.0.00.0030.04720.08
5.6.280.0030.07320.91
5.6.210.0200.06320.57
5.6.200.0070.09018.19
5.6.190.0130.07320.61
5.6.180.3300.04020.51
5.6.170.0130.05720.48
5.6.160.0100.04720.55
5.6.150.0030.09018.19
5.6.140.0100.03318.14
5.6.130.0070.08318.12
5.6.120.0070.05321.04
5.6.110.0100.07321.02
5.6.100.0070.08721.14
5.6.90.0130.06321.00
5.6.80.0070.07720.43
5.6.70.0300.05020.43
5.5.350.0330.07020.50
5.5.340.0030.05317.98
5.5.330.0070.07020.43
5.5.320.0430.07320.27
5.5.310.0170.07020.36
5.5.300.0070.08017.98
5.5.290.0100.04318.08
5.5.280.0030.05720.83
5.5.270.0130.04720.77
5.5.260.0230.05020.88
5.5.250.0070.07320.67
5.5.240.0330.06320.26
5.4.450.0830.06019.56
5.4.440.0100.06319.34
5.4.430.0200.05719.61
5.4.420.0200.05319.70
5.4.410.0130.05319.34
5.4.400.0300.06018.54
5.4.390.0130.05318.63
5.4.380.0300.04718.75
5.4.370.0200.05018.49
5.4.360.0170.05018.70
5.4.350.0060.03712.03
5.4.340.0060.03712.02
5.4.320.0080.03412.52
5.4.310.0060.03812.51
5.4.300.0070.03512.51
5.4.290.0050.03812.50
5.4.280.0130.03312.41
5.4.270.0070.03512.40
5.4.260.0050.04112.40
5.4.250.0130.04318.98
5.4.240.0030.05718.96
5.4.230.0030.07018.90
5.4.220.0070.05318.96
5.4.210.0070.05318.98
5.4.200.0000.05718.75
5.4.190.0070.05018.78
5.4.180.0200.04718.64
5.4.170.0030.05718.65
5.4.160.0200.04018.95
5.4.150.0100.06718.78
5.4.140.0200.04716.48
5.4.130.0030.05016.47
5.4.120.0100.05016.47
5.4.110.0100.05016.57
5.4.100.0100.04716.42
5.4.90.0100.04716.53
5.4.80.0100.04316.45
5.4.70.0070.05316.59
5.4.60.0100.04316.59
5.4.50.0030.05316.63
5.4.40.0030.06016.43
5.4.30.0170.04016.50
5.4.20.0030.05016.50
5.4.10.0100.05016.53
5.4.00.0070.05015.80
5.3.290.0060.04112.80
5.3.280.0000.06014.84
5.3.270.0100.05314.70
5.3.260.0170.05714.77
5.3.250.0100.06714.44
5.3.240.0070.05314.70
5.3.230.0130.06714.85
5.3.220.0130.04714.66
5.3.210.0070.05314.64
5.3.200.0000.05714.74
5.3.190.0030.05714.66
5.3.180.0130.05014.75
5.3.170.0100.04714.65
5.3.160.0070.06714.64
5.3.150.0100.06014.66
5.3.140.0070.05014.55
5.3.130.0100.05014.78
5.3.120.0070.05014.54
5.3.110.0130.04714.57
5.3.100.0100.04714.02
5.3.90.0070.05014.16
5.3.80.0070.04714.09
5.3.70.0130.04314.02
5.3.60.0130.04014.09
5.3.50.0070.04714.03
5.3.40.0030.05014.13
5.3.30.0100.04714.02
5.3.20.0000.05313.69
5.3.10.0070.04713.73
5.3.00.0030.05713.64
5.2.170.0070.04011.24
5.2.160.0070.03711.05
5.2.150.0030.04711.10
5.2.140.0030.04311.14
5.2.130.0030.04711.28
5.2.120.0070.03711.07
5.2.110.0100.03711.26
5.2.100.0070.03711.32
5.2.90.0030.04310.93
5.2.80.0100.04711.22
5.2.70.0070.04311.32
5.2.60.0070.03711.21
5.2.50.0070.04011.09
5.2.40.0100.03710.96
5.2.30.0070.04011.05
5.2.20.0070.03710.94
5.2.10.0070.03310.93
5.2.00.0070.03710.69
5.1.60.0070.03010.09
5.1.50.0000.03710.09
5.1.40.0070.03010.02
5.1.30.0100.03010.32
5.1.20.0130.02710.35
5.1.10.0000.03710.12
5.1.00.0030.05310.14
5.0.50.0070.0308.74
5.0.40.0000.0308.61
5.0.30.0030.0438.28
5.0.20.0030.0278.20
5.0.10.0000.0338.41
5.0.00.0130.0408.07
4.4.90.0030.0237.21
4.4.80.0070.0177.32
4.4.70.0000.0237.32
4.4.60.0030.0207.32
4.4.50.0030.0277.32
4.4.40.0030.0337.32
4.4.30.0030.0207.32
4.4.20.0000.0237.32
4.4.10.0030.0207.32
4.4.00.0000.0407.32
4.3.110.0000.0237.32
4.3.100.0000.0277.32
4.3.90.0070.0177.32
4.3.80.0100.0277.32
4.3.70.0000.0237.32
4.3.60.0000.0237.32
4.3.50.0000.0337.32
4.3.40.0000.0337.32
4.3.30.0000.0237.32
4.3.20.0070.0237.32
4.3.10.0000.0277.32
4.3.00.0130.0207.23

preferences:
38.18 ms | 401 KiB | 5 Q