3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { private $a; public function __construct() { $this->a = 10; } public function printValue() { print "The Value is: {$this->a}\n"; } public function changeValue($val, $obj = null) { if(is_null($obj)) { $this->a = $val; } else { $obj->a = $val; } } public function getValue() { return $this->a; } } $obj_one = new myClass(); $obj_two = new myClass(); $obj_one->changeValue(20, $obj_two); $obj_two->changeValue($obj_two->getValue(), $obj_one); $obj_two->printValue(); $obj_one->printValue();

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.0110.00416.48
8.3.50.0120.00722.01
8.3.40.0090.00618.81
8.3.30.0000.01419.09
8.3.20.0080.00020.04
8.3.10.0020.00523.61
8.3.00.0080.00022.37
8.2.180.0070.01018.26
8.2.170.0070.01122.96
8.2.160.0040.01118.79
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00422.14
8.2.110.0070.00420.89
8.2.100.0090.00317.78
8.2.90.0050.00319.01
8.2.80.0080.00017.97
8.2.70.0050.00317.63
8.2.60.0000.00817.93
8.2.50.0040.00418.10
8.2.40.0060.00318.16
8.2.30.0000.00718.07
8.2.20.0050.00317.59
8.2.10.0000.00817.70
8.2.00.0040.00417.69
8.1.280.0150.00625.92
8.1.270.0040.00423.71
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0090.00022.05
8.1.230.0040.00717.82
8.1.220.0050.00317.78
8.1.210.0030.00518.77
8.1.200.0090.00017.13
8.1.190.0080.00017.13
8.1.180.0060.00318.10
8.1.170.0000.00818.50
8.1.160.0000.00721.93
8.1.150.0000.00718.46
8.1.140.0000.00817.31
8.1.130.0000.00717.86
8.1.120.0070.00017.39
8.1.110.0030.00717.30
8.1.100.0000.00717.45
8.1.90.0000.00717.32
8.1.80.0000.00717.42
8.1.70.0000.00717.25
8.1.60.0090.00017.52
8.1.50.0030.00517.54
8.1.40.0050.00317.43
8.1.30.0000.00817.58
8.1.20.0000.00817.69
8.1.10.0040.00417.48
8.1.00.0080.00017.38
8.0.300.0020.00518.77
8.0.290.0070.00016.63
8.0.280.0040.00418.38
8.0.270.0000.00717.31
8.0.260.0030.00316.77
8.0.250.0000.00716.84
8.0.240.0030.00516.88
8.0.230.0040.00416.87
8.0.220.0030.00416.95
8.0.210.0030.00316.76
8.0.200.0000.00616.96
8.0.190.0040.00416.93
8.0.180.0040.00416.79
8.0.170.0000.00716.83
8.0.160.0000.00716.90
8.0.150.0040.00416.91
8.0.140.0000.00716.78
8.0.130.0050.00013.29
8.0.120.0080.00016.88
8.0.110.0000.00816.81
8.0.100.0030.00516.89
8.0.90.0070.00016.94
8.0.80.0100.01016.92
8.0.70.0040.00416.86
8.0.60.0000.00817.02
8.0.50.0050.00216.86
8.0.30.0070.01217.01
8.0.20.0100.00817.40
8.0.10.0000.00717.02
8.0.00.0090.00816.83
7.4.330.0000.00515.00
7.4.320.0060.00016.55
7.4.300.0050.00216.49
7.4.290.0050.00316.63
7.4.280.0030.00316.52
7.4.270.0030.00316.41
7.4.260.0000.00816.40
7.4.250.0080.00016.49
7.4.240.0020.00616.54
7.4.230.0070.00016.43
7.4.220.0070.01116.52
7.4.210.0050.01016.51
7.4.200.0040.00416.62
7.4.190.0040.00416.58
7.4.160.0100.00616.58
7.4.150.0080.00917.40
7.4.140.0100.01117.86
7.4.130.0110.00516.47
7.4.120.0100.01016.50
7.4.110.0100.01316.41
7.4.100.0030.01316.56
7.4.90.0150.00716.34
7.4.80.0100.00919.39
7.4.70.0100.00716.64
7.4.60.0100.00716.41
7.4.50.0040.00416.46
7.4.40.0070.00722.77
7.4.30.0100.00716.54
7.4.00.0060.00914.78
7.3.330.0030.00313.10
7.3.320.0050.00013.27
7.3.310.0040.00416.30
7.3.300.0060.00016.15
7.3.290.0040.01416.32
7.3.280.0070.01016.32
7.3.270.0070.01017.40
7.3.260.0130.00316.59
7.3.250.0080.00916.47
7.3.240.0100.00716.52
7.3.230.0180.00016.39
7.3.210.0060.01216.25
7.3.200.0000.01619.39
7.3.190.0090.01316.37
7.3.180.0130.00316.36
7.3.170.0070.01116.40
7.3.160.0090.00616.51
7.3.120.0070.00715.04
7.3.10.0070.01016.80
7.3.00.0070.00716.74
7.2.330.0110.01116.61
7.2.320.0070.01016.70
7.2.310.0060.01116.66
7.2.300.0050.01116.71
7.2.290.0100.00716.59
7.2.130.0070.01016.99
7.2.120.0060.00316.98
7.2.110.0000.01416.82
7.2.100.0080.00417.03
7.2.90.0060.00916.93
7.2.80.0090.00617.03
7.2.70.0030.01216.85
7.2.60.0080.00716.92
7.2.50.0070.00916.97
7.2.40.0000.01116.95
7.2.30.0060.01117.05
7.2.20.0140.00016.68
7.2.10.0060.00616.89
7.2.00.0060.00916.96
7.1.250.0030.01015.84
7.1.200.0070.00715.68
7.1.120.0060.01218.54
7.1.110.0070.01017.81
7.1.100.0100.00718.02
7.1.90.0030.01017.82
7.1.80.0040.01117.92
7.1.70.0100.00917.16
7.1.60.0130.00827.14
7.1.50.0160.01025.84
7.1.40.0230.01634.34
7.1.30.0210.00734.65
7.1.20.0190.00934.49
7.1.10.0090.00316.49
7.1.00.0020.04419.54
7.0.260.0110.00617.87
7.0.250.0030.01617.29
7.0.240.0110.00717.65
7.0.230.0060.00917.58
7.0.220.0090.01217.42
7.0.210.0060.00916.48
7.0.200.0000.01316.65
7.0.190.0070.01116.61
7.0.180.0100.00616.42
7.0.170.0040.01216.33
7.0.160.0100.00516.17
7.0.150.0060.00616.46
7.0.140.0020.04419.21
7.0.130.0000.01216.27
7.0.120.0030.00916.75
7.0.110.0060.00616.23
7.0.100.0060.00616.38
7.0.90.0000.01216.38
7.0.80.0030.00916.52
7.0.70.0060.00816.37
7.0.60.0040.02418.11
7.0.50.0000.03116.98
7.0.40.0030.02818.28
7.0.30.0200.03018.31
7.0.20.0150.03218.20
7.0.10.0120.03218.27
7.0.00.0050.04318.34
5.6.300.0100.05620.74
5.6.290.0030.06220.77
5.6.280.0080.06120.96
5.6.270.0130.05020.82
5.6.260.0130.04920.94
5.6.250.0070.05720.88
5.6.240.0030.06220.96
5.6.230.0200.05020.86
5.6.220.0060.06220.72
5.6.210.0070.07320.83
5.6.200.0160.06119.50
5.6.190.0150.06520.74
5.6.180.0050.05320.67
5.6.170.0130.06920.79
5.6.160.0130.06620.60
5.6.150.0050.06019.55
5.6.140.0070.07219.60
5.6.130.0150.06519.60
5.6.120.0030.05920.91
5.6.110.0120.06620.96
5.6.100.0180.04620.98
5.6.90.0100.06620.89
5.6.80.0150.05720.41
5.6.70.0250.06320.30
5.6.60.0100.05420.26
5.6.50.0160.04620.11
5.6.40.0160.04520.10
5.6.30.0180.04720.07
5.6.20.0030.05920.09
5.6.10.0060.05520.34
5.6.00.0220.04120.23
5.5.380.0100.06017.52
5.5.370.0100.05817.51
5.5.360.0160.05117.64
5.5.350.0050.06918.94
5.5.340.0080.05317.98
5.5.330.0100.06619.25
5.5.320.0120.04319.16
5.5.310.0080.05519.24
5.5.300.0080.06018.02
5.5.290.0120.05018.01
5.5.280.0120.08019.42
5.5.270.0050.05019.41
5.5.260.0200.05019.38
5.5.250.0080.05819.12
5.5.240.0030.07118.93
5.5.230.0150.04817.32
5.5.220.0000.06117.43
5.5.210.0030.05717.40
5.5.200.0030.05617.30
5.5.190.0130.05317.41
5.5.180.0100.05217.31
5.5.160.0070.05517.15
5.5.150.0100.05717.12
5.5.140.0070.05317.43
5.5.130.0060.05417.48
5.5.120.0110.05017.29
5.5.110.0100.05217.14
5.5.100.0070.05917.37
5.5.90.0100.04817.31
5.5.80.0070.05317.25
5.5.70.0040.05817.24
5.5.60.0070.05517.35
5.5.50.0100.04916.95
5.5.40.0030.05416.98
5.5.30.0170.04317.21
5.5.20.0170.04416.94
5.5.10.0000.06117.35
5.5.00.0000.06516.97
5.4.450.0190.05019.30
5.4.440.0410.06919.54
5.4.430.0330.05219.47
5.4.420.0310.05719.36
5.4.410.0270.06219.23
5.4.400.0280.05819.09
5.4.390.0330.05318.92
5.4.380.0140.05018.87
5.4.370.0100.05318.69
5.4.360.0080.05718.87
5.4.350.0120.05318.89
5.4.340.0100.05818.80
5.4.320.0060.04715.71
5.4.310.0060.04815.82
5.4.300.0080.04615.71
5.4.290.0070.04815.78
5.4.280.0070.04515.62
5.4.270.0090.04415.71
5.4.260.0090.04515.70
5.4.250.0110.04615.70
5.4.240.0060.05715.70
5.4.230.0060.04615.76
5.4.220.0130.04415.70
5.4.210.0150.04415.73
5.4.200.0170.04515.68
5.4.190.0190.04315.68
5.4.180.0200.06015.71
5.4.170.0140.04615.62
5.4.160.0140.04315.67
5.4.150.0130.05015.75
5.4.140.0140.05714.44
5.4.130.0210.07114.38
5.4.120.0160.04314.26
5.4.110.0130.04614.32
5.4.100.0160.04414.21
5.4.90.0150.04414.32
5.4.80.0120.05014.20
5.4.70.0230.08214.33
5.4.60.0120.04814.33
5.4.50.0120.05614.19
5.4.40.0180.04814.21
5.4.30.0090.05714.28
5.4.20.0180.07514.30
5.4.10.0150.04614.19
5.4.00.0140.05113.80
5.3.290.0120.04213.83
5.3.280.0070.04613.81
5.3.270.0120.05313.73
5.3.260.0120.05113.81
5.3.250.0210.04513.77
5.3.240.0130.05513.70
5.3.230.0150.06213.82
5.3.220.0160.04613.73
5.3.210.0120.05013.72
5.3.200.0120.04913.57
5.3.190.0210.05713.76
5.3.180.0160.04613.65
5.3.170.0120.04813.77
5.3.160.0170.04913.73
5.3.150.0220.03913.77
5.3.140.0130.06213.70
5.3.130.0230.05513.70
5.3.120.0090.05613.64
5.3.110.0190.04513.69
5.3.100.0140.04613.02
5.3.90.0140.04513.20
5.3.80.0150.04613.20
5.3.70.0120.04712.99
5.3.60.0180.05013.13
5.3.50.0140.04713.01
5.3.40.0130.06213.07
5.3.30.0160.04313.10
5.3.20.0160.04212.84
5.3.10.0110.04812.79
5.3.00.0170.04712.62
5.2.170.0070.04310.11
5.2.160.0130.03610.21
5.2.150.0130.03710.27
5.2.140.0100.03910.27
5.2.130.0140.03810.23
5.2.120.0110.03710.23
5.2.110.0130.05110.28
5.2.100.0140.04010.23
5.2.90.0130.03410.24
5.2.80.0110.04310.23
5.2.70.0110.03610.28
5.2.60.0100.04910.20
5.2.50.0090.03910.15
5.2.40.0140.03410.15
5.2.30.0070.04010.01
5.2.20.0130.03610.10
5.2.10.0080.03710.01
5.2.00.0110.0429.82
5.1.60.0150.0419.18
5.1.50.0090.0349.20
5.1.40.0150.0279.02
5.1.30.0070.0369.52
5.1.20.0210.0559.50
5.1.10.0090.0379.11
5.1.00.0120.0339.14
5.0.50.0120.0257.65
5.0.40.0070.0277.59
5.0.30.0090.0387.38
5.0.20.0100.0227.39
5.0.10.0080.0297.33
5.0.00.0180.0587.20
4.4.90.0070.0186.10
4.4.80.0080.0216.09
4.4.70.0070.0206.08
4.4.60.0050.0246.08
4.4.50.0070.0196.09
4.4.40.0100.0306.06
4.4.30.0060.0216.09
4.4.20.0040.0216.13
4.4.10.0070.0216.13
4.4.00.0080.0476.08
4.3.110.0060.0216.04
4.3.100.0080.0186.04
4.3.90.0080.0206.02
4.3.80.0070.0306.00
4.3.70.0050.0216.02
4.3.60.0060.0206.02
4.3.50.0040.0256.02
4.3.40.0090.0295.97
4.3.30.0060.0205.36
4.3.20.0030.0215.35
4.3.10.0040.0205.33
4.3.00.0020.02010.42

preferences:
49.85 ms | 400 KiB | 5 Q