3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Author { public $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 __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.0140.00016.36
8.3.50.0100.00822.96
8.3.40.0130.00618.84
8.3.30.0030.01019.17
8.3.20.0080.00020.34
8.3.10.0080.00023.48
8.3.00.0060.00319.80
8.2.180.0180.00016.63
8.2.170.0040.01122.96
8.2.160.0070.00720.38
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.13
8.2.110.0040.00422.25
8.2.100.0060.00617.62
8.2.90.0050.00319.05
8.2.80.0040.00417.97
8.2.70.0080.00017.50
8.2.60.0000.00918.05
8.2.50.0040.00418.07
8.2.40.0000.00818.22
8.2.30.0040.00418.13
8.2.20.0030.00517.63
8.2.10.0000.00818.14
8.2.00.0000.00717.80
8.1.280.0060.01225.92
8.1.270.0060.00323.83
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00420.73
8.1.230.0000.01120.81
8.1.220.0030.00618.77
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0050.00318.30
8.1.160.0040.00421.97
8.1.150.0000.00718.85
8.1.140.0000.00717.35
8.1.130.0030.00317.79
8.1.120.0050.00217.34
8.1.110.0040.00417.33
8.1.100.0030.00417.40
8.1.90.0030.00317.42
8.1.80.0040.00317.32
8.1.70.0030.00317.33
8.1.60.0040.00417.49
8.1.50.0000.00817.57
8.1.40.0040.00417.48
8.1.30.0030.00517.71
8.1.20.0030.00517.63
8.1.10.0050.00217.59
8.1.00.0040.00417.48
8.0.300.0030.00620.07
8.0.290.0050.00316.75
8.0.280.0030.00318.40
8.0.270.0000.00717.32
8.0.260.0000.00617.28
8.0.250.0000.00716.98
8.0.240.0000.00816.90
8.0.230.0050.00216.79
8.0.220.0030.00316.88
8.0.210.0000.00716.89
8.0.200.0060.00016.80
8.0.190.0030.00416.88
8.0.180.0020.00516.77
8.0.170.0000.00816.90
8.0.160.0000.00816.81
8.0.150.0040.00416.78
8.0.140.0060.00316.84
8.0.130.0000.00513.28
8.0.120.0040.00416.80
8.0.110.0000.00816.86
8.0.100.0040.00416.79
8.0.90.0000.01116.67
8.0.80.0070.00816.84
8.0.70.0040.00416.78
8.0.60.0040.00416.73
8.0.50.0000.00716.79
8.0.30.0110.00816.98
8.0.20.0130.00917.40
8.0.10.0030.00516.86
8.0.00.0110.00816.63
7.4.330.0070.00015.00
7.4.320.0040.00416.54
7.4.300.0030.00316.54
7.4.290.0030.00316.52
7.4.280.0040.00416.43
7.4.270.0040.00416.54
7.4.260.0030.00316.63
7.4.250.0030.00616.39
7.4.240.0000.00716.63
7.4.230.0000.00716.52
7.4.220.0070.01016.66
7.4.210.0160.00316.49
7.4.200.0000.00716.60
7.4.160.0090.00616.68
7.4.150.0090.00917.40
7.4.140.0060.01117.86
7.4.130.0070.01216.56
7.4.120.0040.01316.64
7.4.110.0140.00316.53
7.4.100.0100.00916.47
7.4.90.0160.00616.55
7.4.80.0070.01019.39
7.4.70.0120.00916.66
7.4.60.0070.01016.50
7.4.50.0040.00016.46
7.4.40.0060.01016.52
7.4.30.0120.00616.64
7.4.00.0060.00815.02
7.3.330.0050.00213.23
7.3.320.0050.00013.07
7.3.310.0040.00416.34
7.3.300.0000.00716.36
7.3.290.0070.01116.36
7.3.280.0080.00816.30
7.3.270.0090.00917.40
7.3.260.0130.01016.29
7.3.250.0110.00916.54
7.3.240.0090.00916.24
7.3.230.0030.01316.58
7.3.210.0110.00616.40
7.3.200.0130.00819.39
7.3.190.0070.01016.38
7.3.180.0060.00916.47
7.3.170.0070.01416.45
7.3.160.0100.00616.46
7.3.120.0080.01014.89
7.3.110.0100.00714.61
7.3.100.0080.00514.86
7.3.90.0070.00514.71
7.3.80.0060.00614.71
7.3.70.0070.00514.83
7.3.60.0070.00514.78
7.3.50.0050.00614.88
7.3.40.0090.00714.69
7.3.30.0060.00814.54
7.3.20.0070.00816.66
7.3.10.0090.00616.65
7.3.00.0080.00516.55
7.2.330.0040.01416.77
7.2.320.0030.01316.82
7.2.310.0070.01016.40
7.2.300.0000.01716.46
7.2.290.0060.00916.66
7.2.250.0140.00315.32
7.2.240.0060.01314.98
7.2.230.0050.00815.12
7.2.220.0090.00215.22
7.2.210.0060.00615.16
7.2.200.0080.00814.92
7.2.190.0080.00714.93
7.2.180.0090.00814.93
7.2.170.0040.01015.05
7.2.160.0090.00315.10
7.2.150.0110.00617.02
7.2.140.0110.00417.02
7.2.130.0000.01816.67
7.2.120.0000.01716.85
7.2.110.0090.00616.91
7.2.100.0090.00316.95
7.2.90.0060.00716.95
7.2.80.0000.01716.70
7.2.70.0100.00317.21
7.2.60.0090.00316.92
7.2.50.0030.01216.88
7.2.40.0080.00416.59
7.2.30.0060.01316.89
7.2.20.0060.01016.97
7.2.10.0000.01916.82
7.2.00.0000.01416.96
7.1.330.0070.00815.77
7.1.320.0020.00815.51
7.1.310.0050.00815.75
7.1.300.0050.00715.86
7.1.290.0050.00715.65
7.1.280.0100.00315.65
7.1.270.0090.00515.72
7.1.260.0060.00415.92
7.1.250.0000.01515.74
7.1.200.0060.00615.58
7.1.100.0000.00818.09
7.1.70.0090.00916.65
7.1.60.0060.01319.40
7.1.50.0030.02116.92
7.1.00.0070.06722.54
7.0.200.0030.00316.84
7.0.140.0070.06722.08
7.0.60.0070.04319.86
7.0.50.0070.08017.88
7.0.40.0130.06320.11
7.0.30.0200.04320.10
7.0.20.0270.06320.07
7.0.10.0070.09320.06
7.0.00.0100.06720.16
5.6.280.0130.06021.09
5.6.210.0100.06020.62
5.6.200.0000.04318.14
5.6.190.0100.08020.77
5.6.180.0270.06720.48
5.6.170.0200.04020.47
5.6.160.0130.07720.50
5.6.150.0100.03318.25
5.6.140.0100.04318.24
5.6.130.0070.04718.18
5.6.120.0100.04320.91
5.6.110.0100.04021.12
5.6.100.0100.08321.14
5.6.90.0100.08021.13
5.6.80.0000.08020.39
5.5.350.0030.08020.54
5.5.340.0030.04318.09
5.5.330.0070.06020.34
5.5.320.0330.05720.27
5.5.310.0430.06320.32
5.5.300.0070.08017.94
5.5.290.0100.08017.97
5.5.280.0100.08320.82
5.5.270.0130.08020.74
5.5.260.0070.04020.88
5.5.250.0030.07020.48
5.5.240.0200.06720.18
5.4.450.0230.05019.55
5.4.440.0170.04019.55
5.4.430.0300.04319.30
5.4.420.0270.05019.19
5.4.410.0430.04319.28
5.4.400.0570.03318.84
5.4.390.0500.03719.20
5.4.380.0670.06718.74
5.4.370.0700.05718.51
5.4.360.0900.06318.48
5.4.350.0870.06718.55
5.4.340.0770.05318.62
5.4.320.0070.04012.52
5.4.310.0090.04212.51
5.4.300.0040.04312.52
5.4.290.0060.04612.52
5.4.280.0080.03312.41
5.4.270.0070.03512.41
5.4.260.0090.03412.41
5.4.250.0050.03812.41
5.4.240.0030.03812.41
5.4.230.0050.03812.40
5.4.220.0080.03312.40
5.4.210.0080.03312.40
5.4.200.0060.04012.40
5.4.190.0060.03712.40
5.4.180.0050.04212.40
5.4.170.0040.04212.40
5.4.160.0080.03312.40
5.4.150.0050.03712.39
5.4.140.0080.03912.08
5.4.130.0020.04112.07
5.4.120.0050.03612.03
5.4.110.0070.03512.02
5.4.100.0080.03512.02
5.4.90.0060.03612.02
5.4.80.0070.03912.02
5.4.70.0040.03612.02
5.4.60.0050.03812.02
5.4.50.0070.03412.02
5.4.40.0100.03812.01
5.4.30.0060.04012.00
5.4.20.0040.03712.00
5.4.10.0060.03612.01
5.4.00.0090.03911.49
5.3.290.0060.03912.80
5.3.280.0090.03512.71
5.3.270.0050.04312.72
5.3.260.0070.03812.72
5.3.250.0050.03812.72
5.3.240.0050.03812.72
5.3.230.0080.03712.71
5.3.220.0070.04112.68
5.3.210.0040.04412.68
5.3.200.0060.03612.68
5.3.190.0070.04012.68
5.3.180.0050.03812.67
5.3.170.0020.04112.66
5.3.160.0070.03512.67
5.3.150.0060.03812.67
5.3.140.0090.04212.66
5.3.130.0070.04412.66
5.3.120.0090.04212.66
5.3.110.0030.05012.66
5.3.100.0040.03912.14
5.3.90.0050.03912.12
5.3.80.0090.03812.11
5.3.70.0080.03912.11
5.3.60.0100.03712.10
5.3.50.0080.04012.04
5.3.40.0070.03512.04
5.3.30.0060.03412.00
5.3.20.0080.03411.78
5.3.10.0100.03111.75
5.3.00.0040.03811.73
5.2.170.0030.0359.24
5.2.160.0030.0319.24
5.2.150.0040.0319.24
5.2.140.0040.0379.23
5.2.130.0050.0289.20
5.2.120.0040.0349.20
5.2.110.0080.0429.21
5.2.100.0100.0369.20
5.2.90.0040.0339.20
5.2.80.0060.0289.19
5.2.70.0030.0319.19
5.2.60.0050.0329.15
5.2.50.0040.0329.12
5.2.40.0040.0319.10
5.2.30.0010.0379.07
5.2.20.0060.0309.05
5.2.10.0050.0298.95
5.2.00.0080.0328.83
5.1.60.0070.0218.11
5.1.50.0100.0268.11
5.1.40.0060.0278.09
5.1.30.0030.0278.44
5.1.20.0040.0338.45
5.1.10.0040.0298.19
5.1.00.0040.0258.19
5.0.50.0040.0196.66
5.0.40.0040.0186.52
5.0.30.0040.0306.34
5.0.20.0040.0206.30
5.0.10.0050.0226.28
5.0.00.0030.0386.27
4.4.90.0040.0154.78
4.4.80.0020.0174.76
4.4.70.0040.0144.75
4.4.60.0020.0154.76
4.4.50.0010.0164.77
4.4.40.0020.0264.71
4.4.30.0040.0144.76
4.4.20.0050.0154.84
4.4.10.0040.0164.85
4.4.00.0010.0274.76
4.3.110.0020.0164.67
4.3.100.0010.0164.67
4.3.90.0020.0144.63
4.3.80.0080.0234.59
4.3.70.0030.0194.63
4.3.60.0030.0144.63
4.3.50.0020.0174.63
4.3.40.0050.0234.54
4.3.30.0010.0203.30
4.3.20.0040.0183.28
4.3.10.0060.0143.24
4.3.00.0030.01315.17

preferences:
47.97 ms | 401 KiB | 5 Q