3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Address { protected $city; public function getCity() { return $this->city; } public function setCity($city) { $this->city=$city; } } class Person { protected $name="Tester"; protected $address; public function __construct() { $this->address = new Address; } public function getName(){ return $this->name; } public function __call($method, $args){ if (method_exists($this->address,$method)) { return call_user_func_array( array($this->address,$method),$args); } } } $sharbear = new Person; echo $sharbear->setCity("Baltimore"); echo "Name: ",$sharbear->getName(),"\n"; echo "City: ",$sharbear->getCity();

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.4.130.0130.00817.66
8.4.120.0120.00520.51
8.4.110.0130.00722.25
8.4.100.0130.00817.73
8.4.90.0110.00718.64
8.4.80.0050.00417.86
8.4.70.0320.00617.70
8.4.60.0280.00617.84
8.4.50.0290.00919.37
8.4.40.0270.01118.29
8.4.30.0270.01217.61
8.4.20.0280.00518.36
8.4.10.0300.00617.63
8.3.260.0010.00716.71
8.3.250.0050.00318.84
8.3.240.0110.00816.64
8.3.230.0110.00816.59
8.3.220.0060.00417.18
8.3.210.0260.00716.46
8.3.200.0250.00716.68
8.3.190.0260.00816.51
8.3.180.0230.00716.54
8.3.170.0250.00617.27
8.3.160.0250.00917.02
8.3.150.0270.01117.22
8.3.140.0220.00916.60
8.3.130.0240.00716.50
8.3.120.0260.00617.31
8.3.110.0250.00717.86
8.3.100.0280.00616.48
8.3.90.0290.01119.83
8.3.80.0300.00616.48
8.3.70.0310.00816.42
8.3.60.0280.00817.36
8.3.50.0200.01217.35
8.3.40.0300.00817.96
8.3.30.0220.01018.05
8.3.20.0190.00519.00
8.3.10.0250.00719.60
8.3.00.0280.00618.99
8.2.290.0040.00620.34
8.2.280.0210.01117.29
8.2.270.0220.00917.49
8.2.260.0220.00816.59
8.2.250.0250.00516.92
8.2.240.0150.00716.70
8.2.230.0170.00718.52
8.2.220.0170.00719.02
8.2.210.0230.00819.74
8.2.200.0270.00816.52
8.2.190.0220.00816.55
8.2.180.0230.00816.60
8.2.170.0250.01019.42
8.2.160.0250.00919.13
8.2.150.0200.00819.85
8.2.140.0250.00619.99
8.2.130.0230.00720.46
8.2.120.0210.00518.19
8.2.110.0230.00718.70
8.2.100.0270.00717.63
8.2.90.0260.00518.07
8.2.80.0230.00718.20
8.2.70.0270.00517.58
8.2.60.0220.00717.68
8.2.50.0230.00917.64
8.2.40.0230.00818.48
8.2.30.0190.00718.18
8.2.20.0240.00517.73
8.2.10.0220.00617.64
8.2.00.0220.00717.63
8.1.330.0140.00821.97
8.1.320.0230.00916.10
8.1.310.0210.00816.88
8.1.300.0230.00916.79
8.1.290.0210.00921.15
8.1.280.0240.00819.44
8.1.270.0210.00518.53
8.1.260.0260.00520.34
8.1.250.0240.00520.82
8.1.240.0230.00419.03
8.1.230.0220.00817.39
8.1.220.0210.00717.42
8.1.210.0190.00817.79
8.1.200.0200.00817.35
8.1.190.0170.00717.21
8.1.180.0210.00717.48
8.1.170.0210.00617.72
8.1.160.0230.00517.65
8.1.150.0220.00617.68
8.1.140.0200.00717.78
8.1.130.0200.00617.48
8.1.120.0140.00517.39
8.1.110.0140.00617.37
8.1.100.0180.00517.29
8.1.90.0150.00617.39
8.1.80.0180.00717.34
8.1.70.0150.00617.32
8.1.60.0220.00517.47
8.1.50.0220.00617.31
8.1.40.0200.00817.46
8.1.30.0170.01017.53
8.1.20.0200.00617.48
8.1.10.0170.01017.47
8.1.00.0180.00717.27
8.0.300.0190.00817.31
8.0.290.0210.00816.60
8.0.280.0200.00817.13
8.0.270.0190.00916.90
8.0.260.0260.00616.85
8.0.250.0200.00616.65
8.0.240.0210.00616.72
8.0.230.0230.00816.70
8.0.220.0200.00816.55
8.0.210.0220.00616.71
8.0.200.0210.00616.75
8.0.190.0200.00916.70
8.0.180.0230.00616.63
8.0.170.0200.01016.70
8.0.160.0230.00516.72
8.0.150.0230.00616.68
8.0.140.0220.00716.67
8.0.130.0210.00715.47
8.0.120.0220.00516.77
8.0.110.0220.00616.62
8.0.100.0230.00516.63
8.0.90.0200.00716.62
8.0.80.0280.00716.68
8.0.70.0190.00616.69
8.0.60.0190.01016.58
8.0.50.0200.00816.70
8.0.30.0160.00716.99
8.0.20.0160.00817.24
8.0.10.0250.01016.77
8.0.00.0200.00916.80
7.4.330.0170.00816.10
7.4.320.0180.00716.44
7.4.300.0190.00516.44
7.4.290.0160.01016.35
7.4.280.0160.00816.40
7.4.270.0180.00516.39
7.4.260.0190.00616.38
7.4.250.0220.00416.38
7.4.240.0180.00716.40
7.4.230.0190.00616.45
7.4.220.0160.00816.52
7.4.210.0200.00616.40
7.4.200.0180.00616.44
7.4.190.0210.00716.38
7.4.180.0290.00716.22
7.4.160.0150.00816.41
7.4.150.0230.00716.63
7.4.140.0160.01017.21
7.4.130.0230.00816.42
7.4.120.0170.00916.42
7.4.110.0190.00816.38
7.4.100.0190.00816.49
7.4.90.0180.00816.46
7.4.80.0180.00716.99
7.4.70.0150.01016.45
7.4.60.0170.00816.41
7.4.50.0190.00716.33
7.4.40.0200.00616.40
7.4.30.0200.00916.47
7.4.20.0210.00816.33
7.4.10.0200.00716.36
7.4.00.0120.00915.80
7.3.330.0180.00715.23
7.3.320.0180.00715.23
7.3.310.0210.00416.25
7.3.300.0230.00416.21
7.3.290.0180.00816.27
7.3.280.0180.00616.30
7.3.270.0200.01116.59
7.3.260.0170.00816.34
7.3.250.0170.00716.30
7.3.240.0190.00816.36
7.3.230.0190.00716.33
7.3.220.0190.00916.32
7.3.210.0180.00716.29
7.3.200.0200.00516.33
7.3.190.0190.00916.27
7.3.180.0190.00716.31
7.3.170.0190.00716.38
7.3.160.0180.00816.34
7.3.150.0210.00816.27
7.3.140.0210.00916.26
7.3.130.0220.00616.34
7.3.120.0180.00715.96
7.3.110.0190.00615.90
7.3.100.0190.00815.95
7.3.90.0170.00916.07
7.3.80.0170.00916.02
7.3.70.0160.00716.02
7.3.60.0180.00815.98
7.3.50.0200.00615.97
7.3.40.0200.00515.90
7.3.30.0180.00816.00
7.3.20.0180.00916.70
7.3.10.0170.00816.61
7.3.00.0170.00916.71
7.2.340.0200.00716.42
7.2.330.0190.00816.38
7.2.320.0170.00716.40
7.2.310.0180.00716.40
7.2.300.0180.00616.48
7.2.290.0170.00716.43
7.2.280.0230.00816.55
7.2.270.0220.00716.29
7.2.260.0210.00816.49
7.2.250.0220.00416.09
7.2.240.0160.00816.11
7.2.230.0140.00816.07
7.2.220.0210.00616.02
7.2.210.0190.00815.98
7.2.200.0150.01116.09
7.2.190.0200.00616.09
7.2.180.0180.01016.03
7.2.170.0170.01016.09
7.2.160.0170.01016.19
7.2.150.0230.00716.97
7.2.140.0190.00816.96
7.2.130.0160.00817.01
7.2.120.0170.00917.05
7.2.110.0170.00616.96
7.2.100.0220.00716.99
7.2.90.0230.00716.89
7.2.80.0190.00817.00
7.2.70.0220.00716.97
7.2.60.0180.00616.94
7.2.50.0190.00616.98
7.2.40.0200.00916.92
7.2.30.0190.00916.99
7.2.20.0190.00717.02
7.2.10.0220.00716.98
7.2.00.0200.00817.02
7.1.330.0200.00815.76
7.1.320.0230.00515.92
7.1.310.0200.00615.74
7.1.300.0220.00815.74
7.1.290.0230.00515.70
7.1.280.0190.00815.77
7.1.270.0170.01015.85
7.1.260.0170.00815.84
7.1.250.0180.00715.89
7.1.240.0170.00815.85
7.1.230.0140.00815.91
7.1.220.0180.00815.88
7.1.210.0160.01015.91
7.1.200.0150.00915.81
7.1.190.0170.00915.85
7.1.180.0210.00615.82
7.1.170.0170.00815.84
7.1.160.0150.01215.90
7.1.150.0170.00815.82
7.1.140.0230.00915.79
7.1.130.0190.00915.78
7.1.120.0200.00815.93
7.1.110.0250.00615.80
7.1.100.0190.00715.86
7.1.90.0210.00715.82
7.1.80.0230.00815.83
7.1.70.0180.00715.67
7.1.60.0220.00618.72
7.1.50.0200.00918.66
7.1.40.0220.00818.63
7.1.30.0200.00818.61
7.1.20.0230.00718.63
7.1.10.0180.00915.55
7.1.00.0210.00715.66
7.0.330.0200.00715.56
7.0.320.0280.00715.51
7.0.310.0230.00815.50
7.0.300.0200.00815.59
7.0.290.0210.00615.56
7.0.280.0220.00515.49
7.0.270.0200.00715.52
7.0.260.0450.00615.69
7.0.250.0190.00715.68
7.0.240.0210.00815.57
7.0.230.0200.00815.70
7.0.220.0200.00715.63
7.0.210.0240.00915.53
7.0.200.0200.00915.40
7.0.190.0180.01115.39
7.0.180.0220.00715.39
7.0.170.0180.01015.34
7.0.160.0220.00715.45
7.0.150.0210.00615.44
7.0.140.0230.00915.44
7.0.130.0190.00615.42
7.0.120.0210.00515.39
7.0.110.0200.00615.31
7.0.100.0230.00915.38
7.0.90.0240.00815.41
7.0.80.0220.00715.44
7.0.70.0180.00815.36
7.0.60.0230.01015.38
7.0.50.0220.00615.29
7.0.40.0180.01115.37
7.0.30.0230.00515.38
7.0.20.0190.00815.39
7.0.10.0200.00615.47
7.0.00.0210.00515.33
5.6.400.0200.00715.81
5.6.390.0200.00815.71
5.6.380.0220.00615.75
5.6.370.0210.00915.74
5.6.360.0190.00715.73
5.6.350.0190.00915.80
5.6.340.0210.00715.77
5.6.330.0170.01115.68
5.6.320.0230.00615.80
5.6.310.0200.00915.73
5.6.300.0250.01216.60
5.6.290.0180.01816.56
5.6.280.0180.01716.61
5.6.270.0200.01516.61
5.6.260.0190.01516.55
5.6.250.0190.01616.59
5.6.240.0140.02016.62
5.6.230.0180.01616.61
5.6.220.0140.01916.64
5.6.210.0180.01816.58
5.6.200.0170.01616.56
5.6.190.0210.01516.56
5.6.180.0190.01616.58
5.6.170.0180.01716.54
5.6.160.0190.01416.56
5.6.150.0190.01616.58
5.6.140.0170.01716.61
5.6.130.0180.01616.62
5.6.120.0180.01616.57
5.6.110.0210.01516.61
5.6.100.0210.01516.53
5.6.90.0150.01816.59
5.6.80.0180.01416.41
5.6.70.0200.01616.47
5.6.60.0180.01616.44
5.6.50.0170.01516.39
5.6.40.0150.01716.49
5.6.30.0160.01616.43
5.6.20.0190.01416.40
5.6.10.0160.01616.45
5.6.00.0160.01616.45

preferences:
30.97 ms | 403 KiB | 5 Q