3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Fish { public $common_name; public $flavor; public $record_weight; function __construct($name, $flavor, $record){ $this->common_name = $name; $this->flavor = $flavor; $this->record_weight= $record; } public function getInfo(){ return "A Largemouth Bass is an Excellent flavored fish. The world record weight is 22 pounds 5 ounces." . $this->$common_name . $this->$flavor . $this->$record_weight; } } $f = new Fish(); $bass = new Fish("Largemouth Bass","Excellent","22 pounds 5 ounces"); echo $f->getInfo();

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.61
8.3.50.0110.00416.55
8.3.40.0060.00918.89
8.3.30.0140.00018.84
8.3.20.0070.00020.28
8.3.10.0000.00921.89
8.3.00.0040.00421.90
8.2.180.0090.00616.36
8.2.170.0070.01322.96
8.2.160.0070.00720.43
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0030.00521.12
8.2.120.0040.00426.35
8.2.110.0000.00920.78
8.2.100.0090.00317.84
8.2.90.0060.00618.87
8.2.80.0080.00017.97
8.2.70.0100.00017.63
8.2.60.0000.00817.79
8.2.50.0080.00418.09
8.2.40.0080.00022.36
8.2.30.0040.00419.23
8.2.20.0050.00217.64
8.2.10.0000.00718.11
8.2.00.0040.00418.09
8.1.280.0110.00725.92
8.1.270.0000.01022.11
8.1.260.0060.00328.09
8.1.250.0070.00028.09
8.1.240.0040.00818.88
8.1.230.0070.00417.42
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0040.00417.23
8.1.180.0000.00918.10
8.1.170.0100.00018.36
8.1.160.0040.00420.60
8.1.150.0000.00918.68
8.1.140.0050.00319.40
8.1.130.0000.00717.56
8.1.120.0000.00717.36
8.1.110.0030.00617.28
8.1.100.0000.00717.22
8.1.90.0000.00717.38
8.1.80.0070.00317.38
8.1.70.0000.00717.36
8.1.60.0080.00017.41
8.1.50.0030.00617.50
8.1.40.0000.00817.44
8.1.30.0060.00317.61
8.1.20.0040.00417.57
8.1.10.0040.00417.55
8.1.00.0000.00717.48
8.0.300.0060.00318.77
8.0.290.0030.00516.63
8.0.280.0000.00718.40
8.0.270.0030.00317.12
8.0.260.0000.00617.24
8.0.250.0060.00016.99
8.0.240.0000.00616.93
8.0.230.0050.00217.02
8.0.220.0070.00016.92
8.0.210.0040.00416.77
8.0.200.0000.00616.83
8.0.190.0000.00816.89
8.0.180.0000.00716.96
8.0.170.0000.00816.99
8.0.160.0040.00416.97
8.0.150.0070.00316.91
8.0.140.0040.00416.78
8.0.130.0030.00313.36
8.0.120.0050.00316.88
8.0.110.0040.00416.80
8.0.100.0050.00216.96
8.0.90.0000.00716.78
8.0.80.0120.00916.93
8.0.70.0040.00416.77
8.0.60.0080.00016.92
8.0.50.0040.00416.94
8.0.30.0150.00617.11
8.0.20.0130.00517.40
8.0.10.0040.00416.90
8.0.00.0040.01516.81
7.4.330.0030.00316.67
7.4.320.0000.00616.40
7.4.300.0060.00316.53
7.4.290.0110.00016.38
7.4.280.0040.00416.43
7.4.270.0000.00716.60
7.4.260.0070.00016.55
7.4.250.0000.00716.31
7.4.240.0040.00316.36
7.4.230.0000.00716.62
7.4.220.0110.00716.48
7.4.210.0070.00816.50
7.4.200.0030.00316.44
7.4.160.0090.00616.53
7.4.150.0110.00617.40
7.4.140.0090.00917.86
7.4.130.0130.00916.39
7.4.120.0100.00716.51
7.4.110.0070.01016.64
7.4.100.0060.01316.36
7.4.90.0140.00416.49
7.4.80.0130.00319.39
7.4.70.0040.01216.21
7.4.60.0060.00916.31
7.4.50.0130.00016.64
7.4.40.0060.01616.45
7.4.30.0080.00816.49
7.4.00.0060.00814.83
7.3.330.0030.00313.33
7.3.320.0030.00313.39
7.3.310.0030.00316.41
7.3.300.0000.00716.25
7.3.290.0070.00016.25
7.3.280.0110.00816.36
7.3.270.0070.01017.40
7.3.260.0080.00816.35
7.3.250.0100.00616.33
7.3.240.0080.00816.33
7.3.230.0140.00316.39
7.3.210.0130.00616.63
7.3.200.0100.01419.39
7.3.190.0070.01016.61
7.3.180.0170.00416.52
7.3.170.0060.01716.48
7.3.160.0060.00916.36
7.3.120.0090.00915.07
7.3.110.0110.00714.87
7.3.100.0060.00914.77
7.3.90.0110.00714.94
7.3.80.0040.00715.08
7.3.70.0060.00314.54
7.3.60.0100.00714.66
7.3.50.0000.00914.70
7.3.40.0030.01014.85
7.3.30.0060.00314.84
7.3.20.0100.00316.82
7.3.10.0080.00716.48
7.3.00.0030.01016.47
7.2.330.0080.00816.40
7.2.320.0130.01016.58
7.2.310.0070.01616.49
7.2.300.0060.01316.27
7.2.290.0060.00916.44
7.2.250.0030.01414.57
7.2.240.0100.00614.75
7.2.230.0060.00914.94
7.2.220.0080.00414.80
7.2.210.0070.00714.77
7.2.200.0040.01114.93
7.2.190.0000.01314.82
7.2.180.0030.00614.64
7.2.170.0040.01114.59
7.2.130.0070.00716.82
7.2.120.0070.00716.88
7.2.110.0110.00416.77
7.2.100.0000.01316.91
7.2.90.0060.00916.85
7.2.80.0070.00716.94
7.2.70.0030.00616.85
7.2.60.0020.01316.71
7.2.50.0170.00016.84
7.2.40.0030.01016.84
7.2.30.0060.00616.67
7.2.20.0000.01216.91
7.2.10.0060.00916.59
7.2.00.0040.00718.17
7.1.330.0060.00915.64
7.1.320.0090.00315.47
7.1.310.0030.01315.61
7.1.300.0070.00315.77
7.1.290.0030.01015.73
7.1.280.0030.01015.64
7.1.270.0090.00615.68
7.1.260.0070.00715.67
7.1.250.0090.00315.68
7.1.200.0000.00715.55
7.1.100.0100.01018.21
7.1.70.0080.00316.75
7.1.60.0160.00619.40
7.1.50.0000.01516.77
7.1.00.0070.07322.46
7.0.200.0240.00314.82
7.0.60.0100.04721.82
7.0.50.0170.07317.77
7.0.40.0070.07720.20
7.0.30.0330.07320.08
7.0.20.0270.03720.10
7.0.10.0030.06020.10
7.0.00.0100.05020.22
5.6.280.0000.03721.13
5.6.210.0030.07020.73
5.6.200.0070.08018.16
5.6.190.0070.04320.61
5.6.180.0400.03320.39
5.6.170.0470.06720.45
5.6.160.0130.07720.70
5.6.150.0000.08018.12
5.6.140.0000.04018.18
5.6.130.0000.09018.28
5.6.120.0030.08721.01
5.6.110.0100.06720.96
5.6.100.0130.06021.13
5.6.90.0000.07020.89
5.6.80.0170.06020.49
5.5.350.0270.05020.34
5.5.340.0130.04317.98
5.5.330.0070.05020.57
5.5.320.0270.03320.52
5.5.310.0270.07320.32
5.5.300.0030.08318.03
5.5.290.0000.07018.01
5.5.280.0070.08320.78
5.5.270.0170.07020.68
5.5.260.0000.07020.68
5.5.250.0130.05720.62
5.5.240.0230.07020.27

preferences:
48.57 ms | 400 KiB | 5 Q