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();

Abusive script

This script was stopped while abusing our resources

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)
7.4.10.0100.01516.57
7.4.00.0090.00815.69
7.3.130.0180.00616.34
7.3.120.0190.00616.30
7.3.110.0160.00916.26
7.3.100.0130.01316.52
7.3.90.0200.00516.29
7.3.80.0130.01316.25
7.3.70.0160.01016.27
7.3.60.0140.01416.29
7.3.50.0170.00816.33
7.3.40.0170.01216.29
7.3.30.0170.01116.29
7.3.20.0240.00518.15
7.3.10.0230.01017.98
7.3.00.0230.01218.01
7.2.260.0150.01516.58
7.2.250.0140.00916.34
7.2.240.0140.01116.45
7.2.230.0250.00316.67
7.2.220.0210.00616.43
7.2.210.0100.01416.37
7.2.200.0180.01016.31
7.2.190.0170.00716.43
7.2.180.0130.00916.63
7.2.170.0180.01016.47
7.2.160.0120.01616.53
7.2.150.0230.01316.55
7.2.140.0280.01416.44
7.2.130.0170.01916.46
7.2.120.0870.01218.35
7.2.110.0220.00516.26
7.2.100.0130.01316.41
7.2.90.0190.01318.31
7.2.80.0220.01616.55
7.2.70.0410.00716.43
7.2.60.0220.01416.59
7.2.50.0510.01816.36
7.2.40.0240.00516.48
7.2.30.0120.01716.57
7.2.20.0160.01316.47
7.2.10.0180.01216.43
7.2.00.1210.00917.84
7.1.330.2310.00715.21
7.1.320.0130.01217.34
7.1.310.0470.01315.51
7.1.300.0270.00715.36
7.1.290.0170.01717.16
7.1.280.0840.00415.58
7.1.270.0600.01215.49
7.1.260.0180.01015.29
7.1.250.0280.01115.36
7.1.240.0120.01215.41
7.1.230.0080.01315.31
7.1.220.0090.01615.24
7.1.210.0190.01215.32
7.1.200.0150.00514.35
7.1.190.0230.00813.13
7.1.180.0170.00313.13
7.1.170.0280.00013.14
7.1.160.0080.01715.26
7.1.150.0120.00813.13
7.1.140.0190.01317.12
7.1.130.0200.00313.13
7.1.120.0210.02115.16
7.1.110.0400.00915.36
7.1.100.0090.01316.58
7.1.90.0410.00915.41
7.1.80.0330.00915.42
7.1.70.0210.00416.09
7.1.60.0180.01017.42
7.1.50.0170.00915.91
7.1.40.0180.01215.41
7.1.30.0200.01017.14
7.1.20.0300.01015.41
7.1.10.0190.00817.07
7.1.00.0080.04117.85
7.0.330.0150.01516.97
7.0.320.0160.01215.16
7.0.310.0180.01215.29
7.0.300.0240.01515.18
7.0.290.0780.00415.23
7.0.280.0090.01517.18
7.0.270.0120.01815.07
7.0.260.0210.00715.29
7.0.250.0230.00816.93
7.0.240.0130.01016.89
7.0.230.0130.01315.13
7.0.220.0180.01015.11
7.0.210.0540.01015.13
7.0.200.0260.00716.01
7.0.190.0140.01415.16
7.0.180.0230.01315.12
7.0.170.0430.00715.28
7.0.160.0200.01015.35
7.0.150.0620.01015.04
7.0.140.0190.00013.13
7.0.130.0150.01115.14
7.0.120.0140.00513.13
7.0.110.0160.01216.91
7.0.100.0270.00313.13
7.0.90.0090.01115.14
7.0.80.0450.01015.13
7.0.70.0180.01416.92
7.0.60.0390.02818.45
7.0.50.0100.05017.52
7.0.40.0170.04517.62
7.0.30.0230.02616.76
7.0.20.0250.03817.55
7.0.10.0120.04117.65
7.0.00.0150.04717.47
5.6.400.0040.01615.94
5.6.390.0100.01516.17
5.6.380.0140.01116.16
5.6.370.0130.01015.70
5.6.360.0160.01015.77
5.6.350.0180.01215.96
5.6.340.0090.01413.13
5.6.330.0140.00313.13
5.6.320.0180.01616.03
5.6.310.0190.01116.08
5.6.300.0120.01615.92
5.6.290.0230.00315.59
5.6.280.0090.03618.47
5.6.270.0110.01515.92
5.6.260.0100.01416.02
5.6.250.0190.00415.91
5.6.240.0030.02616.05
5.6.230.0130.00915.91
5.6.220.0240.00015.85
5.6.210.0080.03518.37
5.6.200.0120.04215.68
5.6.190.0110.04818.30
5.6.180.0210.02418.37
5.6.170.0260.04318.29
5.6.160.0090.04918.29
5.6.150.0040.04916.93
5.6.140.0100.02916.98
5.6.130.0120.04317.11
5.6.120.0130.03418.65
5.6.110.0100.03918.36
5.6.100.0050.03718.44
5.6.90.0110.03818.51
5.6.80.0190.03818.16
5.6.70.0150.01015.72
5.6.60.0180.00415.96
5.6.50.0110.01815.69
5.6.40.0130.01015.73
5.6.30.0160.01215.86
5.6.20.0100.01515.89
5.6.10.0110.00713.13
5.6.00.0130.00013.13
5.5.380.0230.00415.71
5.5.370.0160.01515.84
5.5.360.0180.00615.81
5.5.350.0250.04218.21
5.5.340.0080.02816.99
5.5.330.0110.02818.03
5.5.320.0250.03018.07
5.5.310.0230.02416.69
5.5.300.0160.04216.86
5.5.290.0150.04016.88
5.5.280.0140.02718.25
5.5.270.0050.02818.17
5.5.260.0180.03218.38
5.5.250.0120.04318.17
5.5.240.0180.03017.99
5.5.230.0120.01215.85
5.5.220.0080.01215.61
5.5.210.0140.00715.69
5.5.200.0140.01415.76
5.5.190.0100.01015.69
5.5.180.0100.01015.85
5.5.170.0190.00515.79
5.5.160.0120.00715.76
5.5.150.0190.00615.86
5.5.140.0100.01015.70
5.5.130.0140.00815.87
5.5.120.0140.01315.89
5.5.110.0090.01415.86
5.5.100.0130.00815.96
5.5.90.0170.01015.42
5.5.80.0160.01015.84
5.5.70.0210.00715.77
5.5.60.0170.00815.79
5.5.50.0120.01215.84
5.5.40.0110.01815.65
5.5.30.0180.00415.79
5.5.20.0120.01215.80
5.5.10.0130.01415.72
5.5.00.0160.00715.83

preferences:
36.16 ms | 401 KiB | 5 Q