3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Author { private $name; private $id; public function __construct($id, $name = null) { $this->id = $id; $this->name = $name; } public function name() { return $this->name; } public function setName($name) { $this->name = $name; } public function id() { return $this->id; } public function __call($name, $value) { 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, 'George RR Martin')); echo $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.0150.00316.88
8.3.50.0140.00922.86
8.3.40.0150.00018.79
8.3.30.0040.01119.06
8.3.20.0040.00420.33
8.3.10.0000.00721.98
8.3.00.0080.00019.69
8.2.180.0150.00616.88
8.2.170.0110.00422.96
8.2.160.0040.01120.47
8.2.150.0050.00324.18
8.2.140.0030.00524.66
8.2.130.0050.00226.16
8.2.120.0040.00420.95
8.2.110.0000.00822.20
8.2.100.0090.00319.64
8.2.90.0050.00319.23
8.2.80.0060.00317.97
8.2.70.0040.00417.63
8.2.60.0040.00417.90
8.2.50.0060.00318.07
8.2.40.0000.00918.16
8.2.30.0040.00418.12
8.2.20.0050.00217.82
8.2.10.0040.00418.20
8.2.00.0030.00617.64
8.1.280.0100.00725.92
8.1.270.0000.00824.02
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0000.00923.84
8.1.230.0040.00718.97
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0000.00917.23
8.1.190.0000.00817.22
8.1.180.0050.00318.10
8.1.170.0040.00418.50
8.1.160.0000.00721.93
8.1.150.0050.00218.79
8.1.140.0040.00417.42
8.1.130.0030.00317.90
8.1.120.0000.00717.31
8.1.110.0040.00417.30
8.1.100.0000.00717.42
8.1.90.0040.00417.45
8.1.80.0040.00417.30
8.1.70.0070.00017.38
8.1.60.0040.00417.49
8.1.50.0000.00817.42
8.1.40.0050.00317.57
8.1.30.0050.00317.56
8.1.20.0000.00817.70
8.1.10.0040.00417.61
8.1.00.0000.00817.55
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0030.00318.41
8.0.270.0000.00717.26
8.0.260.0000.00717.22
8.0.250.0030.00316.96
8.0.240.0000.00816.91
8.0.230.0000.00716.89
8.0.220.0000.00716.80
8.0.210.0000.00716.91
8.0.200.0000.00717.02
8.0.190.0040.00417.02
8.0.180.0000.00716.86
8.0.170.0040.00417.00
8.0.160.0000.00716.85
8.0.150.0000.00716.88
8.0.140.0030.00716.88
8.0.130.0000.00613.34
8.0.120.0000.00816.89
8.0.110.0040.00416.91
8.0.100.0040.00416.73
8.0.90.0050.00316.91
8.0.80.0000.01516.88
8.0.70.0080.00016.74
8.0.60.0000.00716.93
8.0.50.0040.00416.98
8.0.30.0090.01117.13
8.0.20.0120.01017.40
8.0.10.0050.00317.08
8.0.00.0070.01316.82
7.4.330.0020.00515.00
7.4.320.0080.00016.56
7.4.300.0060.00016.52
7.4.290.0040.00416.62
7.4.280.0000.00716.61
7.4.270.0040.00416.61
7.4.260.0030.00316.41
7.4.250.0000.00716.41
7.4.240.0040.00416.64
7.4.230.0000.00716.63
7.4.220.0150.00916.65
7.4.210.0140.00016.63
7.4.200.0050.00316.44
7.4.160.0070.00716.55
7.4.150.0030.01617.40
7.4.140.0120.00517.86
7.4.130.0100.01016.50
7.4.120.0050.01216.46
7.4.110.0170.00616.66
7.4.100.0260.00416.49
7.4.90.0100.00716.54
7.4.80.0070.01119.39
7.4.70.0100.00716.69
7.4.60.0070.01116.67
7.4.50.0000.00516.62
7.4.40.0070.01016.75
7.4.30.0130.00316.68
7.4.00.0070.01115.01
7.3.330.0060.00013.39
7.3.320.0000.00613.40
7.3.310.0000.00716.41
7.3.300.0030.00316.25
7.3.290.0100.00616.36
7.3.280.0100.00816.41
7.3.270.0060.01317.40
7.3.260.0090.00916.32
7.3.240.0100.01016.61
7.3.230.0060.00916.39
7.3.210.0090.00916.44
7.3.200.0270.01219.39
7.3.190.0070.01016.36
7.3.180.0110.00416.37
7.3.170.0060.01316.52
7.3.160.0030.01316.49
7.3.120.0070.00815.00
7.3.110.0070.01114.72
7.3.100.0040.00715.07
7.3.90.0090.00914.64
7.3.80.0070.00314.71
7.3.70.0120.00314.70
7.3.60.0030.01014.94
7.3.50.0070.00714.77
7.3.40.0070.01015.03
7.3.30.0040.01114.79
7.3.20.0070.01016.71
7.3.10.0060.00616.59
7.3.00.0070.00716.56
7.2.330.0140.00416.70
7.2.320.0140.00316.61
7.2.310.0070.01716.75
7.2.300.0110.00616.66
7.2.290.0100.00616.60
7.2.250.0100.00714.92
7.2.240.0100.01015.18
7.2.230.0060.00914.94
7.2.220.0090.00014.91
7.2.210.0110.00715.27
7.2.200.0030.00615.00
7.2.190.0040.01214.83
7.2.180.0040.00815.11
7.2.170.0040.01415.14
7.2.60.0070.00716.67
7.2.00.0040.00819.46
7.1.330.0040.01115.35
7.1.320.0030.01215.50
7.1.310.0040.01115.84
7.1.300.0030.00615.80
7.1.290.0030.01015.33
7.1.280.0050.00515.38
7.1.270.0030.00615.58
7.1.260.0110.00315.49
7.1.200.0040.00815.51
7.1.100.0110.00818.11
7.1.70.0000.01016.89
7.1.60.0040.01119.40
7.1.50.0090.01216.89
7.1.00.0030.07722.32
7.0.200.0000.00716.45
7.0.140.0030.07321.99
7.0.60.0100.07719.96
7.0.50.0070.04017.92
7.0.40.0100.06020.06
7.0.30.0330.03720.09
7.0.20.0100.04720.25
7.0.10.0070.07720.19
7.0.00.0130.07020.12
5.6.280.0000.08021.11
5.6.210.0100.08320.67
5.6.200.0000.05018.25
5.6.190.0100.04020.78
5.6.180.0330.07720.50
5.6.170.0400.06020.52
5.6.160.0070.08720.39
5.6.150.0070.08318.13
5.6.140.0130.07018.11
5.6.130.0100.08018.27
5.6.120.0000.05021.03
5.6.110.0030.09321.11
5.6.100.0130.07021.05
5.6.90.0070.08321.03
5.6.80.0070.08020.37
5.5.350.0070.08020.35
5.5.340.0000.04318.02
5.5.330.0030.07020.38
5.5.320.0230.04320.42
5.5.310.0330.06720.36
5.5.300.0100.03718.01
5.5.290.0100.07717.96
5.5.280.0030.08720.91
5.5.270.0130.07320.88
5.5.260.0070.08320.89
5.5.250.0030.04320.59
5.5.240.0230.07320.05
5.4.450.1600.04019.39
5.4.440.0700.03719.32
5.4.430.0370.05319.63
5.4.420.0430.04319.38
5.4.410.0200.04019.50
5.4.400.0270.04718.85
5.4.390.0300.04318.84
5.4.380.0400.06318.60
5.4.370.0930.05018.65
5.4.360.0870.06018.69
5.4.350.0900.05318.54
5.4.340.0730.05318.65
5.4.320.0090.04812.52
5.4.310.0060.03712.52
5.4.300.0080.03512.52
5.4.290.0070.03612.52
5.4.280.0030.03812.41
5.4.270.0100.05212.41
5.4.260.0080.04212.41
5.4.250.0070.05012.41
5.4.240.0050.04912.41
5.4.230.0070.04312.40
5.4.220.0140.03112.40
5.4.210.0100.04012.40
5.4.200.0090.03812.41
5.4.190.0060.03612.40
5.4.180.0080.03512.40
5.4.170.0070.04712.41
5.4.160.0090.03312.40
5.4.150.0070.03512.40
5.4.140.0060.03612.09
5.4.130.0060.04112.07
5.4.120.0100.03712.03
5.4.110.0110.04012.03
5.4.100.0060.03912.03
5.4.90.0080.04012.02
5.4.80.0080.04512.03
5.4.70.0070.03812.02
5.4.60.0100.03512.03
5.4.50.0080.03512.02
5.4.40.0060.04612.00
5.4.30.0090.03912.00
5.4.20.0080.04712.00
5.4.10.0100.03612.01
5.4.00.0070.03311.50
5.3.290.0060.05312.80
5.3.280.0080.04012.71
5.3.270.0040.04512.72
5.3.260.0060.03912.72
5.3.250.0040.03912.72
5.3.240.0050.03812.72
5.3.230.0030.04012.71
5.3.220.0070.03612.68
5.3.210.0060.04012.68
5.3.200.0060.03712.68
5.3.190.0080.04112.67
5.3.180.0060.03912.67
5.3.170.0060.04812.67
5.3.160.0090.04212.68
5.3.150.0090.04112.68
5.3.140.0060.03912.66
5.3.130.0050.05112.66
5.3.120.0110.04112.66
5.3.110.0070.04712.66
5.3.100.0070.04712.14
5.3.90.0070.04112.12
5.3.80.0050.04112.11
5.3.70.0080.04412.12
5.3.60.0050.03712.10
5.3.50.0050.04312.05
5.3.40.0070.04112.05
5.3.30.0040.04512.00
5.3.20.0060.03811.79
5.3.10.0050.03611.75
5.3.00.0090.03911.74
5.2.170.0060.0399.24
5.2.160.0070.0279.25
5.2.150.0070.0289.25
5.2.140.0080.0279.24
5.2.130.0030.0299.20
5.2.120.0050.0279.20
5.2.110.0030.0309.21
5.2.100.0060.0279.20
5.2.90.0040.0299.20
5.2.80.0040.0319.20
5.2.70.0050.0299.20
5.2.60.0030.0319.16
5.2.50.0020.0369.12
5.2.40.0040.0289.10
5.2.30.0020.0319.07
5.2.20.0050.0379.06
5.2.10.0090.0288.96
5.2.00.0030.0298.84
5.1.60.0050.0218.12
5.1.50.0030.0268.11
5.1.40.0040.0238.09
5.1.30.0040.0258.45
5.1.20.0070.0228.46
5.1.10.0030.0268.19
5.1.00.0030.0268.19
5.0.50.0030.0246.66
5.0.40.0040.0266.53
5.0.30.0030.0326.33
5.0.20.0070.0246.30
5.0.10.0040.0196.29
5.0.00.0060.0366.27
4.4.90.0050.0224.78
4.4.80.0020.0214.75
4.4.70.0040.0184.76
4.4.60.0040.0164.75
4.4.50.0010.0224.77
4.4.40.0030.0274.70
4.4.30.0030.0214.76
4.4.20.0020.0194.84
4.4.10.0030.0194.85
4.4.00.0040.0324.76
4.3.110.0060.0184.67
4.3.100.0040.0204.67
4.3.90.0050.0204.63
4.3.80.0050.0234.58
4.3.70.0030.0214.63
4.3.60.0030.0164.63
4.3.50.0050.0144.63
4.3.40.0000.0264.54
4.3.30.0020.0163.30
4.3.20.0030.0153.28
4.3.10.0010.0163.23
4.3.00.0070.01715.17

preferences:
36.72 ms | 401 KiB | 5 Q