3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Hello{ private $say; public function say(Hello $obj = null, $val = null) { if (null === $obj) { return $this->say; } $obj->say = $val; } public function __toString() { return $this->say; } } $test1 = new Hello; $test2 = new Hello; $test1->say($test2, 'Hello'); echo $test2;

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.70.0110.00416.75
8.3.60.0070.01116.75
8.3.50.0110.01122.08
8.3.40.0060.00918.84
8.3.30.0100.00619.21
8.3.20.0070.00020.38
8.3.10.0040.00423.70
8.3.00.0070.00022.44
8.2.180.0130.00316.88
8.2.170.0170.00322.96
8.2.160.0100.00320.16
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00422.25
8.2.110.0030.00720.93
8.2.100.0080.00417.91
8.2.90.0080.00019.23
8.2.80.0040.00417.97
8.2.70.0080.00017.63
8.2.60.0030.00618.03
8.2.50.0030.00518.10
8.2.40.0020.00518.22
8.2.30.0080.00017.97
8.2.20.0040.00417.77
8.2.10.0040.00417.79
8.2.00.0040.00417.75
8.1.280.0150.00025.92
8.1.270.0060.00323.92
8.1.260.0050.00326.35
8.1.250.0060.00328.09
8.1.240.0060.00322.74
8.1.230.0110.00017.70
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0030.00517.23
8.1.180.0030.00618.10
8.1.170.0040.00418.65
8.1.160.0030.00622.05
8.1.150.0000.00818.60
8.1.140.0070.00017.42
8.1.130.0000.00717.82
8.1.120.0080.00017.54
8.1.110.0070.00317.46
8.1.100.0040.00417.42
8.1.90.0000.00717.37
8.1.80.0030.00317.31
8.1.70.0070.00017.41
8.1.60.0000.00717.64
8.1.50.0000.00817.54
8.1.40.0000.00817.50
8.1.30.0000.00817.63
8.1.20.0050.00317.70
8.1.10.0040.00417.50
8.1.00.0020.00517.48
8.0.300.0050.00218.77
8.0.290.0080.00016.75
8.0.280.0030.00318.44
8.0.270.0000.00717.16
8.0.260.0030.00316.74
8.0.250.0030.00316.95
8.0.240.0070.00016.81
8.0.230.0040.00416.96
8.0.220.0000.00716.79
8.0.210.0030.00316.78
8.0.200.0030.00316.85
8.0.190.0000.00816.87
8.0.180.0000.00717.00
8.0.170.0040.00416.90
8.0.160.0030.00516.89
8.0.150.0000.00716.83
8.0.140.0000.00716.90
8.0.130.0060.00013.36
8.0.120.0040.00416.84
8.0.110.0040.00416.92
8.0.100.0070.00017.01
8.0.90.0040.00416.96
8.0.80.0150.00616.90
8.0.70.0000.00716.73
8.0.60.0040.00416.92
8.0.50.0070.00016.67
8.0.30.0050.01417.15
8.0.20.0070.01217.40
8.0.10.0020.00516.82
8.0.00.0110.00916.74
7.4.330.0000.00515.02
7.4.320.0030.00316.60
7.4.300.0020.00516.60
7.4.290.0030.00316.61
7.4.280.0050.00216.65
7.4.270.0000.00716.49
7.4.260.0030.00316.59
7.4.250.0090.00016.58
7.4.240.0050.00216.57
7.4.230.0030.00316.63
7.4.220.0110.00716.63
7.4.210.0080.00716.52
7.4.200.0040.00416.60
7.4.190.0000.00816.41
7.4.160.0150.00016.48
7.4.150.0070.01017.40
7.4.140.0080.01017.86
7.4.130.0110.00516.46
7.4.120.0080.00816.48
7.4.110.0030.01316.32
7.4.100.0070.01016.51
7.4.90.0100.00716.52
7.4.80.0100.01019.39
7.4.70.0080.00816.57
7.4.60.0100.00616.49
7.4.50.0030.00616.30
7.4.40.0070.01122.77
7.4.30.0060.00916.38
7.4.00.0070.00814.96
7.3.330.0000.00513.27
7.3.320.0000.00513.12
7.3.310.0000.00716.34
7.3.300.0060.00016.27
7.3.290.0110.00416.31
7.3.280.0100.01016.29
7.3.270.0160.00317.40
7.3.260.0120.01216.21
7.3.250.0110.00616.44
7.3.240.0100.00716.26
7.3.230.0080.00816.47
7.3.210.0100.01416.41
7.3.200.0090.00919.39
7.3.190.0120.00616.65
7.3.180.0100.00616.46
7.3.170.0090.00616.54
7.3.160.0070.01116.50
7.3.120.0060.01114.93
7.3.110.0090.00514.64
7.3.100.0070.00714.73
7.3.90.0060.00414.79
7.3.80.0050.00814.64
7.3.70.0070.00914.77
7.3.60.0040.01014.64
7.3.50.0030.01314.75
7.3.40.0060.00514.76
7.3.30.0090.00514.76
7.3.20.0050.00816.64
7.3.10.0070.00516.46
7.3.00.0080.00816.52
7.2.330.0180.00716.62
7.2.320.0090.00916.60
7.2.310.0070.01016.70
7.2.300.0060.01016.62
7.2.290.0100.00616.45
7.2.250.0080.00714.92
7.2.240.0070.01214.95
7.2.230.0100.00615.01
7.2.220.0070.00815.14
7.2.210.0020.01215.03
7.2.200.0090.00515.07
7.2.190.0020.01415.11
7.2.180.0060.00814.94
7.2.170.0080.00815.18
7.2.110.0210.00716.78
7.2.60.0080.00316.85
7.2.00.0000.01419.48
7.1.330.0060.01015.67
7.1.320.0080.00515.80
7.1.310.0030.01315.86
7.1.300.0030.01015.70
7.1.290.0030.00815.49
7.1.280.0030.00615.69
7.1.270.0030.01015.85
7.1.260.0080.00515.91
7.1.200.0090.00315.51
7.1.100.0040.00818.10
7.1.70.0040.00417.12
7.1.60.0040.00819.29
7.1.50.0090.00916.93
7.1.00.0030.07722.32
7.0.200.0050.00216.89
7.0.140.0030.07321.91
7.0.60.0100.03320.08
7.0.50.0000.04317.88
7.0.40.0070.04319.96
7.0.30.0300.04320.09
7.0.20.0330.08020.04
7.0.10.0170.06720.07
7.0.00.0000.04720.20
5.6.280.0000.07721.16
5.6.210.0270.06020.55
5.6.200.0170.06018.23
5.6.190.0070.07020.65
5.6.180.0070.05320.55
5.6.170.0300.07320.44
5.6.160.0100.04020.62
5.6.150.0100.06718.22
5.6.140.0000.05318.18
5.6.130.0100.08018.18
5.6.120.0030.04721.15
5.6.110.0070.07721.02
5.6.100.0170.07720.94
5.6.90.0030.06321.11
5.6.80.0100.04720.43
5.6.70.0400.07320.44
5.5.350.0100.06320.48
5.5.340.0030.04018.01
5.5.330.0170.08320.43
5.5.320.0000.04320.38
5.5.310.0200.03720.37
5.5.300.0100.05018.08
5.5.290.0100.08317.92
5.5.280.0070.04320.78
5.5.270.0030.04320.86
5.5.260.0070.09320.98
5.5.250.0130.07320.70
5.5.240.0070.03720.13
5.4.450.1030.06319.42
5.4.440.0530.05319.61
5.4.430.0170.06019.58
5.4.420.0570.05019.57
5.4.410.0730.07019.34
5.4.400.0300.05019.23
5.4.390.0200.04718.98
5.4.380.0070.06018.63
5.4.370.0270.04718.50
5.4.360.0100.07718.60
5.4.350.0100.06018.63
5.4.340.0230.04318.84
5.4.320.0050.03712.51
5.4.310.0060.03812.50
5.4.300.0100.03412.50
5.4.290.0090.04012.50
5.4.280.0070.03812.40
5.4.270.0020.04512.40
5.4.260.0070.03612.40
5.4.250.0050.03812.40
5.4.240.0040.03812.40
5.4.230.0040.04312.39
5.4.220.0070.03512.39
5.4.210.0210.04412.38
5.4.200.0360.09112.38
5.4.190.0170.04512.37
5.4.180.0200.04012.37
5.4.170.0180.04912.38
5.4.160.0170.04612.37
5.4.150.0140.04812.37
5.4.140.0090.04912.05
5.4.130.0150.04712.04
5.4.120.0160.04312.00
5.4.110.0160.04512.00
5.4.100.0390.08112.00
5.4.90.0130.04712.00
5.4.80.0150.04511.99
5.4.70.0180.04711.99
5.4.60.0130.04511.99
5.4.50.0130.04411.99
5.4.40.0200.03811.98
5.4.30.0150.04611.97
5.4.20.0160.04511.98
5.4.10.0130.04311.98
5.4.00.0150.04511.46
5.3.290.0080.03712.80
5.3.280.0080.04012.71
5.3.270.0200.04612.72
5.3.260.0180.04612.72
5.3.250.0380.05612.71
5.3.240.0190.04312.72
5.3.230.0160.04712.71
5.3.220.0230.04112.68
5.3.210.0280.06512.68
5.3.200.0190.04212.68
5.3.190.0190.04512.68
5.3.180.0160.04412.68
5.3.170.0180.04112.67
5.3.160.0190.04112.68
5.3.150.0210.04312.68
5.3.140.0180.04412.66
5.3.130.0170.04312.66
5.3.120.0220.04012.65
5.3.110.0120.05012.66
5.3.100.0160.05012.12
5.3.90.0190.04212.09
5.3.80.0240.06712.08
5.3.70.0120.05012.08
5.3.60.0130.04712.07
5.3.50.0200.04012.01
5.3.40.0180.04312.00
5.3.30.0200.04211.98
5.3.20.0200.04011.75
5.3.10.0170.04011.72
5.3.00.0190.04011.70
5.2.170.0130.0349.20
5.2.160.0100.0399.21
5.2.150.0180.0329.21
5.2.140.0140.0359.20
5.2.130.0230.0619.16
5.2.120.0150.0369.16
5.2.110.0240.0369.17
5.2.100.0340.0789.16
5.2.90.0150.0359.17
5.2.80.0160.0329.15
5.2.70.0160.0379.15
5.2.60.0140.0369.12
5.2.50.0080.0409.09
5.2.40.0150.0399.07
5.2.30.0110.0399.03
5.2.20.0140.0379.04
5.2.10.0110.0378.94
5.2.00.0390.0718.79
5.1.60.0110.0318.07
5.1.50.0100.0308.07
5.1.40.0140.0328.05
5.1.30.0170.0308.41
5.1.20.0110.0318.43
5.1.10.0100.0328.15
5.1.00.0370.0668.15
5.0.50.0080.0296.63
5.0.40.0100.0216.48
5.0.30.0070.0386.30
5.0.20.0070.0256.27
5.0.10.0100.0226.25
5.0.00.0090.0356.24
4.4.90.0090.0184.78
4.4.80.0100.0164.75
4.4.70.0070.0194.76
4.4.60.0050.0204.75
4.4.50.0100.0164.77
4.4.40.0070.0324.71
4.4.30.0090.0174.76
4.4.20.0070.0184.84
4.4.10.0090.0164.85
4.4.00.0060.0314.76
4.3.110.0060.0194.67
4.3.100.0090.0164.66
4.3.90.0080.0164.63
4.3.80.0080.0274.58
4.3.70.0070.0184.63
4.3.60.0070.0184.63
4.3.50.0090.0174.63
4.3.40.0110.0254.54
4.3.30.0080.0183.30
4.3.20.0040.0233.28
4.3.10.0050.0183.25
4.3.00.0170.03313.43

preferences:
72.47 ms | 401 KiB | 5 Q