3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Fruit { public function __construct($name, $color) { $this->name = $name; $this->color = $color; } function get_name() { return $this->name; } function get_color() { return $this->color; } } $apple = new Fruit("Apple" , "red"); echo $apple->get_name(),PHP_EOL; echo PHP_EOL; echo $apple->get_color();

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.120.0090.01120.34
8.4.110.0130.00822.22
8.4.100.0080.00118.02
8.4.90.0050.00418.73
8.4.80.0100.01018.02
8.4.70.0130.00717.83
8.4.60.0070.01320.33
8.4.50.0100.00919.52
8.4.40.0060.01317.65
8.4.30.0040.00420.84
8.4.20.0100.01018.05
8.4.10.0060.00323.72
8.3.250.0110.00818.71
8.3.240.0080.01116.56
8.3.230.0070.00416.65
8.3.220.0110.00717.19
8.3.210.0120.00716.69
8.3.200.0110.00916.35
8.3.190.0060.00317.18
8.3.180.0060.00416.68
8.3.170.0070.01117.12
8.3.160.0120.00316.98
8.3.150.0100.00720.69
8.3.140.0110.00718.84
8.3.130.0040.00418.75
8.3.120.0000.00920.75
8.3.110.0050.00520.94
8.3.100.0030.00624.06
8.3.90.0050.00326.77
8.3.80.0060.00317.97
8.3.70.0070.01118.30
8.3.60.0090.00616.63
8.3.50.0100.01016.70
8.3.40.0070.00720.26
8.3.30.0100.00320.31
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0150.00620.43
8.2.280.0090.00218.38
8.2.270.0070.00017.21
8.2.260.0070.01116.42
8.2.250.0040.00416.43
8.2.240.0090.00016.95
8.2.230.0040.00422.58
8.2.220.0030.00637.54
8.2.210.0100.00726.77
8.2.200.0040.00816.63
8.2.190.0110.00716.63
8.2.180.0150.00416.38
8.2.170.0040.01119.09
8.2.160.0030.01022.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0060.00322.13
8.2.110.0060.00322.07
8.2.100.0080.00317.97
8.2.90.0060.00317.84
8.2.80.0000.00919.16
8.2.70.0120.00579.33
8.2.60.0060.01279.33
8.2.50.0140.00679.33
8.2.40.0120.00579.33
8.2.30.0110.00679.33
8.2.20.0140.00479.33
8.2.10.0130.00579.33
8.2.00.0140.00379.33
8.1.330.0100.00722.11
8.1.320.0120.00715.91
8.1.310.0040.00416.39
8.1.300.0070.01117.67
8.1.290.0090.00030.84
8.1.280.0090.00625.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00322.50
8.1.230.0110.00021.03
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0160.00079.33
8.1.190.0130.00379.33
8.1.180.0130.00479.33
8.1.170.0130.00379.33
8.1.160.0100.01079.33
8.1.150.0130.00379.33
8.1.140.0140.00379.33
8.1.130.0110.00579.33
8.1.120.0160.00279.33
8.1.110.0090.00979.33
8.1.100.0130.00479.33
8.1.90.0110.00679.33
8.1.80.0000.01879.33
8.1.70.0140.00479.33
8.1.60.0150.00479.33
8.1.50.0140.00379.33
8.1.40.0090.00979.33
8.1.30.0080.01279.33
8.1.20.0100.01079.33
8.1.10.0190.00079.33
8.1.00.0050.01479.33
8.0.300.0000.00920.08
8.0.290.0110.00779.33
8.0.280.0080.00879.33
8.0.270.0130.00379.33
8.0.260.0180.00079.33
8.0.250.0110.00679.33
8.0.240.0080.00879.33
8.0.230.0140.00279.33
8.0.220.0040.01279.33
8.0.210.0130.00479.33
8.0.200.0070.01079.33
8.0.190.0150.00279.33
8.0.180.0130.00379.33
8.0.170.0110.00579.33
8.0.160.0160.00479.33
8.0.150.0120.00779.33
8.0.140.0130.00579.33
8.0.130.0170.00079.33
8.0.120.0140.00279.33
8.0.110.0120.00479.33
8.0.100.0100.00779.33
8.0.90.0180.00079.33
8.0.80.0180.00079.33
8.0.70.0140.00479.33
8.0.60.0180.00079.33
8.0.50.0160.00079.33
8.0.30.0140.00379.33
8.0.20.0110.00679.33
8.0.10.0060.01179.33

preferences:
28.69 ms | 403 KiB | 5 Q