3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Entity { use Entity\FileInbox\File; 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.60.0160.00616.38
8.3.50.0140.00716.45
8.3.40.0000.01418.89
8.3.30.0140.00018.39
8.3.20.0000.00720.39
8.3.10.0030.00623.61
8.3.00.0000.01019.56
8.2.180.0090.00625.92
8.2.170.0100.01018.60
8.2.160.0110.00422.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0090.00017.47
8.2.110.0090.00022.12
8.2.100.0090.00317.50
8.2.90.0000.00819.09
8.2.80.0000.00817.97
8.2.70.0080.00017.50
8.2.60.0050.00317.80
8.2.50.0060.00318.07
8.2.40.0040.00819.02
8.2.30.0070.00417.93
8.2.20.0040.00417.60
8.2.10.0030.00917.92
8.2.00.0040.00417.97
8.1.280.0140.00325.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00022.34
8.1.230.0040.00817.42
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.10
8.1.190.0050.00217.10
8.1.180.0060.00318.10
8.1.170.0060.00318.52
8.1.160.0030.00722.00
8.1.150.0050.00318.67
8.1.140.0030.00517.23
8.1.130.0070.00017.57
8.1.120.0030.00317.16
8.1.110.0050.00317.32
8.1.100.0000.00717.37
8.1.90.0050.00217.34
8.1.80.0060.00317.30
8.1.70.0000.00717.32
8.1.60.0000.00817.46
8.1.50.0040.00417.40
8.1.40.0000.00817.37
8.1.30.0060.00317.40
8.1.20.0040.00417.46
8.1.10.0030.00617.33
8.1.00.0040.00417.17
8.0.300.0070.00318.77
8.0.290.0040.00416.63
8.0.280.0030.00318.32
8.0.270.0030.00317.04
8.0.260.0030.00317.02
8.0.250.0040.00416.89
8.0.240.0050.00316.74
8.0.230.0030.00316.87
8.0.220.0000.00616.79
8.0.210.0000.00716.88
8.0.200.0030.00616.77
8.0.190.0030.00516.75
8.0.180.0000.00716.88
8.0.170.0030.00616.79
8.0.160.0070.00016.88
8.0.150.0060.00316.82
8.0.140.0000.00716.77
8.0.130.0030.00313.28
8.0.120.0050.00216.76
8.0.110.0040.00416.88
8.0.100.0000.00716.61
8.0.90.0040.00416.72
8.0.80.0040.01516.76
8.0.70.0070.00016.61
8.0.60.0050.00316.80
8.0.50.0040.00416.88
8.0.30.0090.00916.91
8.0.20.0110.00817.40
8.0.10.0000.00816.92
8.0.00.0040.01216.64
7.4.330.0030.00315.08
7.4.320.0030.00316.26
7.4.300.0030.00316.28
7.4.290.0070.00016.31
7.4.280.0030.00616.27
7.4.270.0030.00316.27
7.4.260.0040.00416.31
7.4.250.0030.00316.34
7.4.240.0000.00716.37
7.4.230.0000.00716.53
7.4.220.0100.00716.30
7.4.210.0070.00716.38
7.4.200.0030.00316.20
7.4.160.0060.00916.34
7.4.150.0140.00317.40
7.4.140.0060.01217.86
7.4.130.0120.00716.27
7.4.120.0100.00716.37
7.4.110.0070.01116.49
7.4.100.0120.00616.35
7.4.90.0070.01416.31
7.4.80.0160.00319.39
7.4.70.0040.01416.28
7.4.60.0070.01316.21
7.4.50.0050.00016.30
7.4.40.0060.01116.44
7.4.30.0030.01716.37
7.4.00.0090.00614.78
7.3.330.0050.00213.10
7.3.320.0040.00413.01
7.3.310.0000.00716.28
7.3.300.0030.00316.22
7.3.290.0000.00716.20
7.3.280.0040.01316.23
7.3.270.0150.00317.40
7.3.260.0170.00716.13
7.3.250.0080.00916.30
7.3.240.0060.01616.34
7.3.230.0090.01116.39
7.3.210.0170.00016.27
7.3.200.0070.01016.46
7.3.190.0030.01316.43
7.3.180.0080.00716.43
7.3.170.0040.01416.37
7.3.160.0100.01016.23
7.2.330.0100.00716.18
7.2.320.0030.01616.27
7.2.310.0060.01516.50
7.2.300.0120.00616.48
7.2.290.0030.01316.57
7.2.60.0090.00616.68
7.2.00.0120.00318.91
7.1.200.0000.01215.70
7.1.100.0000.01117.95
7.1.70.0040.00816.86
7.1.60.0090.01519.17
7.1.50.0110.01416.87
7.1.00.0100.07022.43
7.0.200.0090.00314.75
7.0.60.0070.07019.93
7.0.50.0030.04317.94
7.0.40.0030.07320.14
7.0.30.0330.05020.24
7.0.20.0300.07720.23
7.0.10.0000.06020.26
7.0.00.0030.04020.05
5.6.280.0030.03320.92
5.6.210.0070.04020.56
5.6.200.0070.04718.17
5.6.190.0100.06720.63
5.6.180.3130.04020.57
5.6.170.0270.07320.50
5.6.160.0070.04020.50
5.6.150.0070.03718.13
5.6.140.0100.05018.08
5.6.130.0100.09018.22
5.6.120.0100.07720.99
5.6.110.0070.08321.02
5.6.100.0100.07020.97
5.6.90.0100.03720.95
5.6.80.0030.04020.39
5.6.70.4230.04020.40
5.5.350.0100.07720.40
5.5.340.0000.04317.96
5.5.330.0100.07720.15
5.5.320.0300.03320.28
5.5.310.0330.06320.30
5.5.300.0100.08317.91
5.5.290.0070.08317.91
5.5.280.0100.06720.76
5.5.270.0070.05020.79
5.5.260.0130.08020.72
5.5.250.0070.07320.66
5.5.240.0170.07720.18
5.4.450.0970.05719.25
5.4.440.0700.05719.21
5.4.430.0930.05719.43
5.4.420.0700.05319.00
5.4.410.0800.04318.86
5.4.400.0670.05319.10
5.4.390.0900.05719.05
5.4.380.1030.05018.89
5.4.370.0970.04318.95
5.4.360.0930.04019.12
5.4.350.0800.04719.10
5.4.340.0700.06019.03
5.4.320.0670.06019.10
5.4.310.0700.05019.12
5.4.300.0730.05319.12
5.4.290.0630.05719.11
5.4.280.0700.05719.12
5.4.270.0730.05719.12
5.4.260.0770.04718.93
5.4.250.0700.05719.11
5.4.240.0730.04719.09
5.4.230.0770.05319.11
5.4.220.0730.05019.04
5.4.210.0630.06318.84
5.4.200.0670.06019.11
5.4.190.0770.05019.07
5.4.180.0770.05018.82
5.4.170.0900.05018.70
5.4.160.0900.05018.86
5.4.150.0800.06718.89
5.4.140.0970.05016.22
5.4.130.0870.05316.42
5.4.120.0970.05016.29
5.4.110.1000.04316.46
5.4.100.0900.05316.38
5.4.90.1000.04016.38
5.4.80.0900.04716.43
5.4.70.0270.02716.45
5.4.60.0200.04316.37
5.4.50.0030.05316.36
5.4.40.0230.07316.37
5.4.30.0130.04716.36
5.4.20.0300.03716.36

preferences:
53.91 ms | 400 KiB | 5 Q