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; use Entity\FileInbox\File; $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.0080.00818.70
8.3.30.0150.00418.71
8.3.20.0000.00820.04
8.3.10.0080.00023.56
8.3.00.0000.00919.78
8.2.170.0070.00722.96
8.2.160.0030.01020.40
8.2.150.0080.00024.18
8.2.140.0120.00624.66
8.2.130.0040.00426.16
8.2.120.0060.00317.63
8.2.110.0050.00520.85
8.2.100.0060.00617.86
8.2.90.0030.00619.09
8.2.80.0060.00317.97
8.2.70.0030.00517.63
8.2.60.0040.00417.80
8.2.50.0050.00518.07
8.2.40.0030.00620.99
8.2.30.0070.00319.83
8.2.20.0000.00717.64
8.2.10.0070.00418.00
8.2.00.0060.00317.91
8.1.270.0120.00620.39
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0050.00521.17
8.1.230.0070.00417.42
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0090.00417.13
8.1.190.0000.00717.36
8.1.180.0040.00418.10
8.1.170.0040.00418.27
8.1.160.0030.00621.89
8.1.150.0050.00218.83
8.1.140.0080.00017.39
8.1.130.0030.00317.66
8.1.120.0030.00517.35
8.1.110.0040.00417.31
8.1.100.0050.00217.42
8.1.90.0000.00717.35
8.1.80.0060.00317.30
8.1.70.0000.00717.33
8.1.60.0000.00817.48
8.1.50.0050.00317.42
8.1.40.0080.00017.47
8.1.30.0110.00317.71
8.1.20.0030.00517.68
8.1.10.0030.00517.61
8.1.00.0020.00517.52
8.0.300.0000.00718.77
8.0.290.0030.00616.58
8.0.280.0000.00818.39
8.0.270.0030.00317.29
8.0.260.0050.00317.12
8.0.250.0000.00816.89
8.0.240.0070.00016.97
8.0.230.0070.00016.93
8.0.220.0030.00316.95
8.0.210.0050.00316.97
8.0.200.0040.00416.93
8.0.190.0030.00516.86
8.0.180.0040.00416.97
8.0.170.0090.00016.91
8.0.160.0080.00016.93
8.0.150.0040.00716.80
8.0.140.0030.00316.90
8.0.130.0000.00613.40
8.0.120.0000.00816.76
8.0.110.0040.00416.90
8.0.100.0040.00416.79
8.0.90.0000.00716.98
8.0.80.0120.00816.80
8.0.70.0040.00416.93
8.0.60.0040.00416.84
8.0.50.0040.00416.92
8.0.30.0040.01017.18
8.0.20.0110.00717.40
8.0.10.0000.00717.07
8.0.00.0110.00716.66
7.4.330.0050.00015.08
7.4.320.0000.00616.56
7.4.300.0030.00316.47
7.4.290.0030.00316.46
7.4.280.0040.00416.52
7.4.270.0000.00916.52
7.4.260.0060.00316.54
7.4.250.0040.00416.50
7.4.240.0020.00516.57
7.4.230.0030.00316.51
7.4.220.0100.00716.55
7.4.210.0090.00816.61
7.4.200.0040.00416.52
7.4.160.0100.00716.60
7.4.150.0110.00617.40
7.4.140.0130.00517.86
7.4.130.0110.00916.49
7.4.120.0130.00716.39
7.4.110.0030.01416.66
7.4.100.0070.01416.63
7.4.90.0120.00616.72
7.4.80.0090.00919.39
7.4.70.0130.00316.39
7.4.60.0160.00016.56
7.4.50.0090.00016.27
7.4.40.0030.01316.36
7.4.30.0030.01416.54
7.4.00.0110.00615.04
7.3.330.0020.00513.38
7.3.320.0000.00813.38
7.3.310.0000.00716.28
7.3.300.0070.00016.34
7.3.290.0030.00316.35
7.3.280.0120.00616.33
7.3.270.0150.00017.40
7.3.260.0070.01516.55
7.3.250.0090.00816.33
7.3.240.0130.01016.46
7.3.230.0100.00716.39
7.3.210.0110.00616.40
7.3.200.0000.01716.37
7.3.190.0120.00916.25
7.3.180.0120.00416.18
7.3.170.0090.00916.32
7.3.160.0100.00716.25
7.3.120.0150.00315.03
7.3.110.0070.01114.76
7.3.100.0100.00614.96
7.3.90.0040.01215.04
7.3.80.0000.01414.78
7.3.70.0070.00714.49
7.3.60.0130.00714.88
7.3.50.0120.00314.54
7.3.40.0040.00814.74
7.3.30.0000.01314.83
7.3.20.0030.01416.70
7.3.10.0070.00716.50
7.3.00.0040.00916.53
7.2.330.0140.00316.62
7.2.320.0120.00916.38
7.2.310.0120.01216.36
7.2.300.0210.00016.38
7.2.290.0100.00716.57
7.2.250.0060.00915.18
7.2.240.0070.01314.82
7.2.230.0100.00715.14
7.2.220.0030.01014.84
7.2.210.0060.00314.83
7.2.200.0100.00715.13
7.2.190.0030.00915.06
7.2.180.0090.00615.05
7.2.170.0030.00814.97
7.2.130.0000.01416.71
7.2.120.0040.00416.65
7.2.110.0060.00616.79
7.2.100.0060.00917.02
7.2.90.0000.01217.04
7.2.80.0070.00716.78
7.2.70.0090.00916.75
7.2.60.0060.01016.69
7.2.50.0040.00416.76
7.2.40.0030.00916.71
7.2.30.0000.01416.98
7.2.20.0100.00616.84
7.2.10.0070.00316.89
7.2.00.0030.00917.97
7.1.330.0040.01115.89
7.1.320.0030.00915.47
7.1.310.0030.00615.70
7.1.300.0100.01015.68
7.1.290.0060.00615.79
7.1.280.0070.00715.48
7.1.270.0040.00815.57
7.1.260.0110.00315.42
7.1.250.0070.00315.56
7.1.200.0110.00315.42
7.1.100.0070.00718.20
7.1.70.0200.00716.92
7.1.60.0170.00719.17
7.1.50.0060.01616.83
7.1.00.0070.07322.36
7.0.200.0030.00614.70
7.0.60.0000.08719.91
7.0.50.0030.04317.82
7.0.40.0170.07320.21
7.0.30.0470.04720.26
7.0.20.0370.07020.33
7.0.10.0100.08320.26
7.0.00.0070.03720.05
5.6.280.0000.04320.91
5.6.210.0000.04320.71
5.6.200.0070.08018.21
5.6.190.0030.05720.68
5.6.180.4300.03320.57
5.6.170.0300.08020.45
5.6.160.0030.04320.54
5.6.150.0070.05318.25
5.6.140.0100.04718.18
5.6.130.0070.07318.29
5.6.120.0100.06321.02
5.6.110.0030.06320.98
5.6.100.0100.07320.88
5.6.90.0070.04021.10
5.6.80.0100.03320.29
5.6.70.0870.04020.52
5.5.350.0000.07720.44
5.5.340.0230.03018.05
5.5.330.0000.09020.29
5.5.320.0230.06320.36
5.5.310.0300.05320.35
5.5.300.0070.04017.95
5.5.290.0100.06017.98
5.5.280.0100.04020.70
5.5.270.0030.05320.77
5.5.260.0170.07320.80
5.5.250.0100.08020.70
5.5.240.0200.07720.26
5.4.450.1170.06019.06
5.4.440.0900.06319.41
5.4.430.0870.06019.09
5.4.420.0700.05719.44
5.4.410.0630.06319.14
5.4.400.0800.05318.96
5.4.390.0870.06318.94
5.4.380.0730.05319.16
5.4.370.0700.05319.18
5.4.360.0730.06018.92
5.4.350.0800.07018.95
5.4.340.0700.06018.72
5.4.320.0670.06019.18
5.4.310.0930.07319.13
5.4.300.0900.05718.94
5.4.290.0930.05719.11
5.4.280.0930.06018.92
5.4.270.1230.06019.11
5.4.260.1100.06319.09
5.4.250.0970.03319.09
5.4.240.1070.04018.93
5.4.230.0870.06019.16
5.4.220.0770.05319.09
5.4.210.0770.05318.89
5.4.200.0800.04719.04
5.4.190.0730.05719.09
5.4.180.0870.04718.89
5.4.170.0770.05019.08
5.4.160.0970.05019.19
5.4.150.0900.04319.09
5.4.140.0970.04716.49
5.4.130.1070.06016.39
5.4.120.0870.06016.60
5.4.110.0930.05316.63
5.4.100.0930.04316.64
5.4.90.1070.04716.59
5.4.80.0930.04316.59
5.4.70.0200.04716.39
5.4.60.0170.04016.57
5.4.50.0030.07316.52
5.4.40.0270.04716.52
5.4.30.0100.05016.43
5.4.20.0330.05716.43

preferences:
47.03 ms | 400 KiB | 5 Q