3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $var = 1; public function fun1(){ return $this->var++; } public function fun2(){ echo preg_replace_callback('/.+/', function($find){var_dump($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.40.0040.01119.09
8.3.30.0070.00720.29
8.3.20.0080.00020.29
8.3.10.0040.00421.96
8.3.00.0040.00422.39
8.2.170.0120.00322.96
8.2.160.0030.01020.45
8.2.150.0050.00224.18
8.2.140.0000.00824.66
8.2.130.0100.01026.16
8.2.120.0030.00519.54
8.2.110.0000.00922.10
8.2.100.0100.00019.21
8.2.90.0080.00019.21
8.2.80.0000.00819.24
8.2.70.0090.00017.88
8.2.60.0040.00418.04
8.2.50.0050.00318.07
8.2.40.0000.00918.22
8.2.30.0070.00018.21
8.2.20.0070.00017.86
8.2.10.0080.00017.78
8.2.00.0050.00317.89
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00023.71
8.1.230.0070.00418.97
8.1.220.0080.00017.89
8.1.210.0050.00518.77
8.1.200.0030.00717.60
8.1.190.0030.00517.52
8.1.180.0080.00019.36
8.1.170.0030.00518.61
8.1.160.0000.00722.16
8.1.150.0040.00418.79
8.1.140.0000.00817.58
8.1.130.0030.00317.81
8.1.120.0000.00717.51
8.1.110.0050.00517.46
8.1.100.0040.00417.50
8.1.90.0000.00717.58
8.1.80.0070.00017.65
8.1.70.0050.00317.61
8.1.60.0040.00417.61
8.1.50.0070.00017.71
8.1.40.0020.00517.68
8.1.30.0040.00417.79
8.1.20.0030.00617.79
8.1.10.0000.00817.71
8.1.00.0080.00017.54
8.0.300.0070.00018.77
8.0.290.0040.00417.16
8.0.280.0040.00418.46
8.0.270.0040.00417.21
8.0.260.0000.00816.88
8.0.250.0030.00317.07
8.0.240.0050.00317.06
8.0.230.0000.00717.05
8.0.220.0070.00017.05
8.0.210.0000.00717.08
8.0.200.0060.00016.99
8.0.190.0030.00617.11
8.0.180.0040.00417.08
8.0.170.0080.00016.95
8.0.160.0000.00716.88
8.0.150.0030.00516.98
8.0.140.0060.00316.96
8.0.130.0060.00013.45
8.0.120.0000.00817.02
8.0.110.0040.00417.00
8.0.100.0000.00817.05
8.0.90.0070.00016.84
8.0.80.0070.00716.99
8.0.70.0030.00516.91
8.0.60.0080.00016.84
8.0.50.0000.00716.97
8.0.30.0090.00917.35
8.0.20.0140.00817.43
8.0.10.0050.00317.15
8.0.00.0110.00716.99
7.4.330.0060.00015.00
7.4.320.0000.00616.71
7.4.300.0030.00316.80
7.4.290.0070.00016.73
7.4.280.0000.00816.68
7.4.270.0070.00016.74
7.4.260.0100.00016.60
7.4.250.0080.00016.71
7.4.240.0030.00316.75
7.4.230.0030.00316.78
7.4.220.0100.01616.71
7.4.210.0040.01116.75
7.4.200.0070.00016.75
7.4.190.0040.00416.88
7.4.160.0110.00616.58
7.4.150.0090.00917.40
7.4.140.0090.00917.86
7.4.130.0100.00716.70
7.4.120.0120.00916.50
7.4.110.0150.00816.83
7.4.100.0150.00316.51
7.4.90.0090.00916.73
7.4.80.0090.00919.39
7.4.70.0130.00916.65
7.4.60.0070.01016.60
7.4.50.0040.00016.88
7.4.40.0060.00922.77
7.4.30.0120.00616.83
7.4.00.0000.01715.15
7.3.330.0000.00613.44
7.3.320.0060.00013.48
7.3.310.0000.00716.48
7.3.300.0030.00316.38
7.3.290.0060.01316.38
7.3.280.0100.00916.47
7.3.270.0170.00017.40
7.3.260.0070.01016.87
7.3.250.0140.00616.67
7.3.240.0090.00916.50
7.3.230.0080.00816.65
7.3.210.0160.00016.62
7.3.200.0060.01219.39
7.3.190.0140.00716.86
7.3.180.0050.01016.56
7.3.170.0090.00616.44
7.3.160.0040.01316.45
7.3.120.0110.00315.03
7.3.10.0180.01116.23
7.3.00.0170.00616.49
7.2.330.0060.01516.96
7.2.320.0070.01016.73
7.2.310.0060.01617.01
7.2.300.0040.01416.82
7.2.290.0100.00616.83
7.2.130.0080.01416.41
7.2.120.0220.00316.62
7.2.110.0260.00716.71
7.2.100.0200.00716.89
7.2.90.0220.01116.72
7.2.80.0200.00416.88
7.2.70.0260.01016.67
7.2.60.0060.00616.77
7.2.50.0430.00616.98
7.2.40.0190.00316.66
7.2.30.0270.01016.37
7.2.20.0760.00316.31
7.2.10.0220.00417.09
7.2.00.0610.00916.93
7.1.250.0140.00315.65
7.1.200.0000.01515.97
7.1.70.0070.00717.38
7.1.60.0070.01819.43
7.1.50.0120.00617.14
7.1.00.0030.07322.37
7.0.200.0110.00416.90
7.0.140.0130.06322.04
7.0.60.0200.07319.96
7.0.50.0070.03717.88
7.0.40.0030.04320.15
7.0.30.0400.05020.35
7.0.20.0100.05320.31
7.0.10.0130.07720.26
7.0.00.0000.09020.09
5.6.280.0000.07720.93
5.6.210.0030.04320.57
5.6.200.0100.08318.18
5.6.190.0000.06020.40
5.6.180.4130.03720.67
5.6.170.0170.04720.38
5.6.160.0030.05320.43
5.6.150.0030.07318.22
5.6.140.0030.06018.18
5.6.130.0100.05718.18
5.6.120.0100.06720.99
5.6.110.0130.08021.08
5.6.100.0330.07021.12
5.6.90.0200.07720.97
5.6.80.0030.08320.37
5.6.70.0330.06720.36
5.5.350.0270.07320.50
5.5.340.0100.07718.07
5.5.330.0130.07320.40
5.5.320.0330.07020.32
5.5.310.0270.05020.34
5.5.300.0130.07017.95
5.5.290.0070.04718.03
5.5.280.0030.08020.77
5.5.270.0070.08320.95
5.5.260.0030.08320.73
5.5.250.0100.03720.59
5.5.240.0370.06720.28
5.4.450.0630.06019.58
5.4.440.0170.06319.58
5.4.430.0100.06319.54
5.4.420.0170.05719.61
5.4.410.0330.04319.25
5.4.400.0370.07018.89
5.4.390.0430.06718.64
5.4.380.0270.05018.58
5.4.370.0170.05018.80
5.4.360.0230.04318.75
5.4.350.0100.03612.02
5.4.340.0060.04212.02
5.4.320.0050.03812.51
5.4.310.0060.03912.51
5.4.300.0030.04212.51
5.4.290.0040.04012.50
5.4.280.0060.03412.40
5.4.270.0060.04112.40
5.4.260.0050.03912.40
5.4.250.0030.05718.95
5.4.240.0070.05318.94
5.4.230.0070.05018.80
5.4.220.0130.05018.93
5.4.210.0070.06018.98
5.4.200.0130.07018.99
5.4.190.0030.05719.09
5.4.180.0000.05718.98
5.4.170.0070.05319.02
5.4.160.0100.05018.98
5.4.150.0130.04718.95
5.4.140.0100.05016.63
5.4.130.0070.04716.59
5.4.120.0070.05016.59
5.4.110.0030.05316.61
5.4.100.0070.06016.39
5.4.90.0030.05716.48
5.4.80.0100.04716.55
5.4.70.0100.04716.36
5.4.60.0070.05016.48
5.4.50.0030.05016.46
5.4.40.0030.05016.44
5.4.30.0070.04716.47
5.4.20.0070.06016.39
5.4.10.0000.06316.33
5.4.00.0130.05315.98
5.3.290.0070.04012.80
5.3.280.0070.05014.51
5.3.270.0170.04314.76
5.3.260.0030.05314.70
5.3.250.0070.05314.77
5.3.240.0030.05714.63
5.3.230.0000.05714.59
5.3.220.0070.05014.40
5.3.210.0030.05314.60
5.3.200.0170.04014.75
5.3.190.0130.04714.64
5.3.180.0130.04314.66
5.3.170.0030.05314.54
5.3.160.0130.04714.55
5.3.150.0000.05714.54
5.3.140.0070.07714.55
5.3.130.0000.05714.52
5.3.120.0100.07014.38
5.3.110.0070.05014.59
5.3.100.0200.05314.03
5.3.90.0070.04713.92
5.3.80.0070.05014.18
5.3.70.0030.07314.11
5.3.60.0070.04714.16
5.3.50.0130.04314.05
5.3.40.0200.06014.03
5.3.30.0100.04313.94
5.3.20.0100.04713.79
5.3.10.0130.04013.71
5.3.00.0100.06313.64
5.2.170.0070.04011.23
5.2.160.0070.03711.13
5.2.150.0070.04011.13
5.2.140.0070.04011.23
5.2.130.0070.03711.28
5.2.120.0030.04311.19
5.2.110.0030.04011.18
5.2.100.0070.03711.18
5.2.90.0100.05311.05
5.2.80.0100.03311.16
5.2.70.0030.04011.04
5.2.60.0000.04311.11
5.2.50.0100.03711.24
5.2.40.0130.03010.95
5.2.30.0130.03011.03
5.2.20.0170.03010.95
5.2.10.0070.03710.84
5.2.00.0100.03710.90
5.1.60.0000.0379.97
5.1.50.0030.03310.09
5.1.40.0070.03010.14
5.1.30.0070.04310.32
5.1.20.0070.03310.45
5.1.10.0070.03310.06
5.1.00.0030.03710.13
5.0.50.0000.0308.71
5.0.40.0070.0238.46
5.0.30.0070.0508.21
5.0.20.0030.0278.26
5.0.10.0070.0238.14
5.0.00.0070.0378.21
4.4.90.0000.0237.32
4.4.80.0000.0207.32
4.4.70.0030.0207.32
4.4.60.0000.0237.32
4.4.50.0070.0207.32
4.4.40.0070.0277.32
4.4.30.0030.0207.32
4.4.20.0030.0207.32
4.4.10.0030.0237.32
4.4.00.0070.0307.32
4.3.110.0070.0237.32
4.3.100.0030.0207.32
4.3.90.0070.0237.32
4.3.80.0100.0277.32
4.3.70.0000.0207.32
4.3.60.0070.0277.32
4.3.50.0070.0277.32
4.3.40.0030.0307.32
4.3.30.0000.0337.32
4.3.20.0000.0237.32
4.3.10.0030.0237.32
4.3.00.0130.0307.21

preferences:
49.97 ms | 400 KiB | 5 Q