3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Entity { class File { private $foo = 'top'; } class FileInbox { public $file; public function setFile(File $file) { $this->file = $file; } } } namespace Entity\FileInbox { class File { private $foo = 'nested'; } } namespace Test { use Entity\FileInbox; $fileInbox = new FileInbox(); $fileInbox->setFile(new File()); var_dump($fileInbox->file->foo); }

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.0130.00318.84
8.3.30.0070.01118.76
8.3.20.0040.00420.34
8.3.10.0000.00823.67
8.3.00.0080.01219.52
8.2.170.0120.00322.96
8.2.160.0070.00720.37
8.2.150.0030.00624.18
8.2.140.0130.00724.66
8.2.130.0030.00526.16
8.2.120.0060.00317.63
8.2.110.0100.00019.20
8.2.100.0120.00017.85
8.2.90.0030.00519.09
8.2.80.0040.00417.97
8.2.70.0000.00817.50
8.2.60.0080.00017.92
8.2.50.0030.00618.07
8.2.40.0060.00619.28
8.2.30.0030.00617.98
8.2.20.0060.00317.76
8.2.10.0030.00617.87
8.2.00.0040.00417.87
8.1.270.0130.00620.29
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0090.00023.88
8.1.230.0040.00817.42
8.1.220.0000.00917.74
8.1.210.0030.00518.77
8.1.200.0030.00617.23
8.1.190.0050.00317.23
8.1.180.0060.00318.10
8.1.170.0000.00818.50
8.1.160.0030.00621.86
8.1.150.0030.00518.86
8.1.140.0040.00417.32
8.1.130.0030.00317.58
8.1.120.0030.00517.43
8.1.110.0000.00717.29
8.1.100.0020.00517.43
8.1.90.0000.00717.35
8.1.80.0070.00017.31
8.1.70.0070.00017.47
8.1.60.0040.00417.57
8.1.50.0040.00417.46
8.1.40.0000.00817.51
8.1.30.0060.00317.59
8.1.20.0040.00417.62
8.1.10.0050.00217.54
8.1.00.0040.00417.56
8.0.300.0030.00518.77
8.0.290.0040.00416.63
8.0.280.0030.00318.39
8.0.270.0070.00017.20
8.0.260.0000.00817.20
8.0.250.0050.00316.93
8.0.240.0080.00017.00
8.0.230.0040.00417.01
8.0.220.0000.00716.92
8.0.210.0000.00716.78
8.0.200.0000.00716.84
8.0.190.0040.00416.95
8.0.180.0070.00016.89
8.0.170.0000.01016.74
8.0.160.0030.00316.96
8.0.150.0030.00316.76
8.0.140.0000.00716.85
8.0.130.0040.00413.37
8.0.120.0000.00816.77
8.0.110.0040.00416.84
8.0.100.0000.00716.78
8.0.90.0040.00416.96
8.0.80.0060.01216.95
8.0.70.0070.00016.72
8.0.60.0040.00416.77
8.0.50.0040.00416.99
8.0.30.0090.01117.00
8.0.20.0080.01017.40
8.0.10.0000.00716.91
8.0.00.0070.01116.75
7.4.330.0000.00615.08
7.4.320.0000.00616.47
7.4.300.0030.00316.50
7.4.290.0030.00316.62
7.4.280.0040.00416.61
7.4.270.0080.00016.42
7.4.260.0080.00016.51
7.4.250.0000.00716.52
7.4.240.0020.00516.53
7.4.230.0000.00716.60
7.4.220.0060.01216.45
7.4.210.0010.01316.55
7.4.200.0050.00316.47
7.4.160.0090.00616.44
7.4.150.0150.00917.40
7.4.140.0100.00817.86
7.4.130.0130.00816.63
7.4.120.0130.00516.51
7.4.110.0040.01816.75
7.4.100.0140.00616.52
7.4.90.0120.00416.44
7.4.80.0060.01519.39
7.4.70.0120.00616.56
7.4.60.0080.00816.52
7.4.50.0040.00416.61
7.4.40.0030.01316.57
7.4.30.0130.01016.30
7.4.00.0050.01314.78
7.3.330.0000.00613.38
7.3.320.0050.00313.21
7.3.310.0040.00416.33
7.3.300.0000.00716.39
7.3.290.0030.00316.41
7.3.280.0100.00716.37
7.3.270.0130.00317.40
7.3.260.0140.00716.45
7.3.250.0060.01216.44
7.3.240.0070.01316.68
7.3.230.0140.01016.45
7.3.210.0030.01416.39
7.3.200.0030.01316.62
7.3.190.0100.00716.46
7.3.180.0030.01316.37
7.3.170.0080.00816.32
7.3.160.0030.01316.53
7.3.120.0080.01115.02
7.3.110.0100.01014.76
7.3.100.0030.01214.95
7.3.90.0090.00614.90
7.3.80.0110.00315.00
7.3.70.0030.01014.91
7.3.60.0030.00914.91
7.3.50.0030.01014.73
7.3.40.0040.01114.54
7.3.30.0060.00914.78
7.3.20.0110.00716.68
7.3.10.0090.00916.50
7.3.00.0070.00716.62
7.2.330.0100.00716.43
7.2.320.0110.00716.61
7.2.310.0090.00916.53
7.2.300.0060.00916.62
7.2.290.0100.00716.63
7.2.250.0100.00714.89
7.2.240.0030.01314.86
7.2.230.0150.00315.00
7.2.220.0030.01315.14
7.2.210.0110.00614.89
7.2.200.0070.00714.97
7.2.190.0060.00914.60
7.2.180.0040.01114.82
7.2.170.0070.00714.79
7.2.60.0040.01117.03
7.2.00.0030.00619.50
7.1.330.0090.00615.76
7.1.320.0090.00615.61
7.1.310.0040.00715.76
7.1.300.0070.00715.66
7.1.290.0000.01115.70
7.1.280.0030.01515.37
7.1.270.0100.00715.64
7.1.260.0060.01215.58
7.1.200.0070.00715.48
7.1.100.0060.00917.91
7.1.70.0000.00816.67
7.1.60.0100.01319.17
7.1.50.0110.01416.95
7.1.00.0130.06722.25
7.0.200.0130.00614.78
7.0.60.0070.09019.78
7.0.50.0070.03717.88
7.0.40.0100.07720.18
7.0.30.0300.07020.10
7.0.20.0200.05720.24
7.0.10.0000.05020.23
7.0.00.0000.04720.09
5.6.280.0030.03021.02
5.6.210.0170.07320.45
5.6.200.0100.07018.21
5.6.190.0070.04020.52
5.6.180.0100.07020.52
5.6.170.0300.07320.54
5.6.160.0030.05320.44
5.6.150.0100.03318.19
5.6.140.0070.08018.24
5.6.130.0030.08718.21
5.6.120.0130.08721.00
5.6.110.0100.08020.98
5.6.100.0030.04020.99
5.6.90.0070.04721.03
5.6.80.0100.07720.38
5.6.70.0230.07320.33
5.5.350.0300.07020.44
5.5.340.0000.05717.98
5.5.330.0170.08020.29
5.5.320.0030.04020.42
5.5.310.0230.08320.31
5.5.300.0100.03317.98
5.5.290.0200.06317.94
5.5.280.0030.07020.98
5.5.270.0100.06020.95
5.5.260.0000.09020.86
5.5.250.0030.07020.67
5.5.240.0270.06720.27
5.4.450.1070.04319.45
5.4.440.1000.05319.27
5.4.430.1030.05719.27
5.4.420.1230.07319.50
5.4.410.0970.05319.38
5.4.400.0730.05718.95
5.4.390.0870.06018.95
5.4.380.0970.04719.12
5.4.370.0970.05319.18
5.4.360.1000.05718.90
5.4.350.0800.06019.10
5.4.340.1100.07019.21
5.4.320.0930.06019.09
5.4.310.1030.06018.91
5.4.300.0870.05318.95
5.4.290.1130.04719.10
5.4.280.0930.05718.90
5.4.270.0930.05318.71
5.4.260.0970.04719.16
5.4.250.1170.06019.18
5.4.240.0930.05318.76
5.4.230.0870.05719.09
5.4.220.1070.05318.94
5.4.210.0900.05719.11
5.4.200.0900.05318.76
5.4.190.0770.05718.93
5.4.180.0930.05718.93
5.4.170.0770.05319.10
5.4.160.0330.06018.92
5.4.150.0170.05018.75
5.4.140.0170.06316.53
5.4.130.0800.05716.38
5.4.120.0830.05016.38
5.4.110.0730.06716.61
5.4.100.0730.05316.29
5.4.90.0130.04316.61
5.4.80.0130.05316.50
5.4.70.0270.07016.62
5.4.60.0200.03716.35
5.4.50.0070.03316.48
5.4.40.0200.06716.17
5.4.30.0070.07016.57
5.4.20.0000.03716.42

preferences:
50.95 ms | 400 KiB | 5 Q