3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Author { private $name; private $id; public function __construct($id) { $this->id = $id; $this->name = null; } public function name() { return $this->name; } public function setName($name) { $this->name = $name; } public function id() { return $this->id; } public function __get($name) { echo 'we dont have all the pieces, look em up'; die; } } class Post { private $id; private $title; private $body; private $author; public function __construct($id, $title, $body, $author) { $this->id = $id; $this->title = $title; $this->body = $body; $this->author = $author; } public function id() { return $this->id; } public function title() { return $this->title; } public function setTitle($title) { $this->title = $title; } public function author() { return $this->author; } public function setAuthor(Author $author) { $this->author = $author; } } $post = new Post(111, 'A Song of Ice and Fire', 'My book is the shiz', new Author(222)); var_dump($post->author()->name());

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.38
8.3.50.0170.00822.87
8.3.40.0040.01118.84
8.3.30.0090.00618.93
8.3.20.0040.00420.39
8.3.10.0070.00021.82
8.3.00.0050.00319.56
8.2.180.0040.01416.88
8.2.170.0170.00322.96
8.2.160.0000.01320.42
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0030.00521.16
8.2.110.0130.00722.24
8.2.100.0080.00417.78
8.2.90.0050.00319.08
8.2.80.0000.00817.97
8.2.70.0000.00817.38
8.2.60.0000.00917.68
8.2.50.0000.00818.07
8.2.40.0050.00317.95
8.2.30.0000.00718.02
8.2.20.0030.00617.64
8.2.10.0040.00417.95
8.2.00.0000.00717.57
8.1.280.0100.01025.92
8.1.270.0000.00823.97
8.1.260.0050.00326.35
8.1.250.0050.00228.09
8.1.240.0030.00622.47
8.1.230.0040.00720.89
8.1.220.0060.00318.77
8.1.210.0040.00418.84
8.1.200.0080.00017.23
8.1.190.0040.00417.13
8.1.180.0000.00818.10
8.1.170.0050.00318.66
8.1.160.0040.00422.03
8.1.150.0000.00718.88
8.1.140.0000.00717.45
8.1.130.0070.00017.76
8.1.120.0040.00417.39
8.1.110.0040.00417.35
8.1.100.0000.00817.32
8.1.90.0070.00017.43
8.1.80.0070.00017.41
8.1.70.0070.00017.34
8.1.60.0050.00317.48
8.1.50.0000.00817.49
8.1.40.0080.00017.39
8.1.30.0000.00817.61
8.1.20.0050.00317.57
8.1.10.0040.00417.53
8.1.00.0000.00917.51
8.0.300.0110.00019.94
8.0.290.0040.00416.63
8.0.280.0030.00318.46
8.0.270.0080.00017.21
8.0.260.0030.00318.45
8.0.250.0030.00316.81
8.0.240.0000.00716.80
8.0.230.0040.00416.80
8.0.220.0070.00016.72
8.0.210.0030.00316.82
8.0.200.0000.00616.87
8.0.190.0000.00716.93
8.0.180.0000.00816.78
8.0.170.0040.00416.93
8.0.160.0000.00916.90
8.0.150.0030.00316.82
8.0.140.0000.01016.84
8.0.130.0030.00313.25
8.0.120.0000.00716.84
8.0.110.0040.00416.84
8.0.100.0080.00016.80
8.0.90.0060.00316.91
8.0.80.0070.01016.80
8.0.70.0040.00416.77
8.0.60.0050.00216.73
8.0.50.0040.00416.95
8.0.30.0080.01116.87
8.0.20.0170.00517.40
8.0.10.0050.00216.92
8.0.00.0100.01016.78
7.4.330.0030.00315.09
7.4.320.0030.00316.46
7.4.300.0030.00316.52
7.4.290.0000.00716.57
7.4.280.0000.00716.59
7.4.270.0030.00316.51
7.4.260.0070.00016.45
7.4.250.0080.00016.47
7.4.240.0020.00516.61
7.4.230.0030.00316.35
7.4.220.0070.01016.52
7.4.210.0090.00616.49
7.4.200.0050.00216.60
7.4.160.0030.01216.48
7.4.150.0110.01417.40
7.4.140.0120.00517.86
7.4.130.0050.01216.56
7.4.120.0090.00916.49
7.4.110.0120.00416.62
7.4.100.0060.01316.45
7.4.90.0140.00316.69
7.4.80.0090.00919.39
7.4.70.0130.00316.45
7.4.60.0030.01316.30
7.4.50.0030.00616.51
7.4.40.0070.01716.33
7.4.30.0120.00816.42
7.4.00.0070.00614.91
7.3.330.0000.00713.18
7.3.320.0000.00613.20
7.3.310.0040.00416.35
7.3.300.0030.00316.32
7.3.290.0070.00716.33
7.3.280.0080.00916.33
7.3.270.0090.00917.40
7.3.260.0090.00916.15
7.3.250.0090.01516.30
7.3.240.0140.00316.50
7.3.230.0060.00916.39
7.3.210.0070.01116.24
7.3.200.0130.01019.39
7.3.190.0070.01016.19
7.3.180.0210.00016.58
7.3.170.0110.00616.43
7.3.160.0060.00916.57
7.3.120.0060.00814.89
7.3.110.0030.01114.87
7.3.100.0070.00514.86
7.3.90.0080.00514.70
7.3.80.0050.00514.67
7.3.70.0050.00814.69
7.3.60.0060.00914.53
7.3.50.0040.00714.88
7.3.40.0090.00314.67
7.3.30.0080.00514.51
7.3.20.0090.00516.54
7.3.10.0050.00916.32
7.3.00.0080.00816.50
7.2.330.0060.01216.28
7.2.320.0100.00716.79
7.2.310.0090.00616.56
7.2.300.0100.01016.27
7.2.290.0060.01116.52
7.2.250.0050.01215.10
7.2.240.0030.01515.05
7.2.230.0040.01515.22
7.2.220.0040.01314.86
7.2.210.0070.00714.82
7.2.200.0080.00414.80
7.2.190.0050.01114.91
7.2.180.0090.00514.94
7.2.170.0100.00614.97
7.2.00.0070.01019.31
7.1.330.0020.01215.80
7.1.320.0070.00815.76
7.1.310.0070.00715.75
7.1.300.0060.00615.75
7.1.290.0060.00515.73
7.1.280.0090.00715.49
7.1.270.0080.00715.70
7.1.260.0060.00515.67
7.1.100.0030.00717.94
7.1.70.0090.00917.16
7.1.60.0060.01319.40
7.1.50.0060.01816.90
7.1.00.0000.08022.48
7.0.200.0030.00316.67
7.0.140.0030.07322.23
7.0.60.0070.03719.96
7.0.50.0100.04717.79
7.0.40.0070.04020.13
7.0.30.0130.04320.23
7.0.20.0300.06720.15
7.0.10.0400.07020.19
7.0.00.0070.04020.32
5.6.280.0000.07320.93
5.6.210.0200.06720.74
5.6.200.0030.05318.28
5.6.190.0130.03720.61
5.6.180.0200.05320.55
5.6.170.0270.07720.47
5.6.160.0070.08320.61
5.6.150.0070.03718.16
5.6.140.0130.07318.29
5.6.130.0130.07018.18
5.6.120.0070.05021.14
5.6.110.0070.08321.03
5.6.100.0030.07721.12
5.6.90.0070.08021.12
5.6.80.0100.05020.49
5.6.70.0430.04320.39
5.5.350.0130.08320.34
5.5.340.0100.07317.98
5.5.330.0070.05020.25
5.5.320.0230.03720.36
5.5.310.0230.08020.34
5.5.300.0070.04317.97
5.5.290.0070.05018.04
5.5.280.0030.07320.82
5.5.270.0030.04020.88
5.5.260.0170.07020.85
5.5.250.0030.07020.71
5.5.240.0070.08020.38
5.4.450.0130.06019.60
5.4.440.0200.05319.48
5.4.430.0100.07019.68
5.4.420.0070.06019.41
5.4.410.0100.05319.25
5.4.400.0170.04719.25
5.4.390.0030.07719.02
5.4.380.0130.05318.71
5.4.370.0100.05318.74
5.4.360.0130.03718.72
5.4.350.0070.03912.04
5.4.340.0150.06712.03
5.4.320.0070.04912.52
5.4.310.0060.04112.52
5.4.300.0080.03812.51
5.4.290.0040.04012.50
5.4.280.0090.03412.41
5.4.270.0080.03312.41
5.4.260.0080.04712.41
5.4.250.0050.03812.41
5.4.240.0070.04312.41
5.4.230.0070.04212.40
5.4.220.0060.03812.40
5.4.210.0090.03612.39
5.4.200.0080.04512.39
5.4.190.0050.04612.40
5.4.180.0080.03612.39
5.4.170.0050.04012.41
5.4.160.0070.03612.40
5.4.150.0080.03912.39
5.4.140.0060.03612.09
5.4.130.0070.03312.07
5.4.120.0030.03712.03
5.4.110.0030.03712.02
5.4.100.0040.03612.03
5.4.90.0080.03912.02
5.4.80.0090.03812.03
5.4.70.0050.03512.02
5.4.60.0040.03612.02
5.4.50.0080.03612.02
5.4.40.0080.03312.00
5.4.30.0080.03312.00
5.4.20.0050.03812.01
5.4.10.0060.03712.00
5.4.00.0050.03611.49
5.3.290.0060.04612.80
5.3.280.0060.04212.71
5.3.270.0060.04212.72
5.3.260.0100.04012.72
5.3.250.0060.03712.72
5.3.240.0050.03812.72
5.3.230.0060.03612.71
5.3.220.0040.03812.68
5.3.210.0070.03712.68
5.3.200.0040.03812.68
5.3.190.0030.04012.68
5.3.180.0060.03612.67
5.3.170.0040.03812.67
5.3.160.0090.03412.67
5.3.150.0040.03912.68
5.3.140.0120.03012.66
5.3.130.0040.04012.66
5.3.120.0100.03512.65
5.3.110.0070.04412.66
5.3.100.0080.04412.14
5.3.90.0050.04212.12
5.3.80.0070.03512.11
5.3.70.0070.03412.11
5.3.60.0090.04312.09
5.3.50.0150.03412.04
5.3.40.0080.03512.04
5.3.30.0070.03411.99
5.3.20.0050.03711.78
5.3.10.0040.04111.75
5.3.00.0040.03911.74
5.2.170.0050.0309.24
5.2.160.0050.0359.24
5.2.150.0040.0319.24
5.2.140.0040.0309.23
5.2.130.0050.0289.20
5.2.120.0050.0279.20
5.2.110.0090.0309.21
5.2.100.0060.0339.20
5.2.90.0100.0329.20
5.2.80.0070.0319.20
5.2.70.0040.0319.19
5.2.60.0050.0339.15
5.2.50.0030.0379.12
5.2.40.0050.0309.09
5.2.30.0030.0349.07
5.2.20.0070.0289.05
5.2.10.0050.0318.95
5.2.00.0030.0348.82
5.1.60.0050.0258.11
5.1.50.0030.0258.10
5.1.40.0050.0238.09
5.1.30.0020.0368.43
5.1.20.0070.0248.46
5.1.10.0050.0258.18
5.1.00.0040.0308.19
5.0.50.0060.0176.66
5.0.40.0050.0206.52
5.0.30.0060.0286.33
5.0.20.0030.0206.30
5.0.10.0030.0206.28
5.0.00.0020.0326.27
4.4.90.0020.0164.78
4.4.80.0040.0144.75
4.4.70.0030.0194.76
4.4.60.0040.0184.75
4.4.50.0040.0154.77
4.4.40.0040.0244.70
4.4.30.0010.0174.76
4.4.20.0010.0174.84
4.4.10.0050.0184.85
4.4.00.0030.0264.76
4.3.110.0020.0194.67
4.3.100.0040.0134.66
4.3.90.0030.0144.64
4.3.80.0040.0234.58
4.3.70.0030.0174.63
4.3.60.0040.0154.62
4.3.50.0070.0134.63
4.3.40.0040.0274.54
4.3.30.0040.0163.30
4.3.20.0010.0183.28
4.3.10.0000.0203.24
4.3.00.0000.0237.13

preferences:
40.2 ms | 401 KiB | 5 Q