3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface WorldInterface { function doAThing($foo); } class World implements WorldInterface { public function __construct(string $name) { $this->name = $name; } public function doAThing($foo) { echo $foo; } } class BackwardsWorld implements WorldInterface { public function __construct(string $name) { $this->name = strrev($name); } public function doAThing($foo) { echo strrev($foo); } } class Hello { /** * @var World */ private $world; public function setWorld( WorldInterface $world ) { $this->world = $world; } } class WorldFactory { // full disclosure: I'm still bad at factories public static function makeWorld($name) { return new World($name); } public static function makeDlrow($name) { return new BackwardsWorld($name); } } $hey = new Hello(); $hey->setWorld(WorldFactory::makeWorld('blorp')); $yeh = new Hello(); $yeh->setWorld(WorldFactory::makeDlrow('blorp')); var_dump($hey, $yeh);

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.0040.01416.63
8.3.50.0110.00418.38
8.3.40.0120.00318.86
8.3.30.0110.00418.49
8.3.20.0040.00421.89
8.3.10.0040.00420.61
8.3.00.0080.00020.89
8.2.180.0120.00920.17
8.2.170.0040.01122.96
8.2.160.0150.00320.15
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0070.00022.25
8.2.120.0050.00226.35
8.2.110.0100.00019.39
8.2.100.0080.00418.03
8.2.90.0060.00319.21
8.2.80.0080.00017.97
8.2.70.0030.00617.75
8.2.60.0090.00017.98
8.2.50.0000.00818.10
8.2.40.0040.00422.23
8.2.30.0040.00422.28
8.2.20.0030.00517.98
8.2.10.0040.00417.94
8.2.00.0030.00518.13
8.1.280.0070.01025.92
8.1.270.0040.00423.77
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00621.10
8.1.230.0040.00717.42
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0070.00317.35
8.1.190.0060.00317.23
8.1.180.0060.00318.10
8.1.170.0000.00818.50
8.1.160.0000.00818.77
8.1.150.0040.00420.36
8.1.140.0040.00419.58
8.1.130.0040.00419.08
8.1.120.0000.00717.44
8.1.110.0080.00017.45
8.1.100.0030.00517.43
8.1.90.0040.00417.35
8.1.80.0040.00417.37
8.1.70.0030.00317.46
8.1.60.0000.00717.49
8.1.50.0000.00817.54
8.1.40.0040.00417.45
8.1.30.0000.00817.68
8.1.20.0040.00417.66
8.1.10.0080.00017.44
8.1.00.0030.00917.41
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00818.45
8.0.270.0000.00717.18
8.0.260.0030.00317.27
8.0.250.0000.00717.05
8.0.240.0040.00416.90
8.0.230.0040.00417.00
8.0.220.0050.00216.96
8.0.210.0000.00716.97
8.0.200.0030.00316.90
8.0.190.0030.00517.04
8.0.180.0040.00416.99
8.0.170.0040.00416.82
8.0.160.0000.00716.95
8.0.150.0000.00716.76
8.0.140.0040.00416.92
8.0.130.0030.00313.45
8.0.120.0040.00416.84
8.0.110.0000.00816.92
8.0.100.0000.00716.79
8.0.90.0000.00717.02
8.0.80.0070.00716.96
8.0.70.0000.00717.01
8.0.60.0040.00417.00
8.0.50.0050.00216.82
8.0.30.0100.00917.15
8.0.20.0100.01017.40
8.0.10.0070.00016.93
8.0.00.0070.01116.71
7.4.330.0060.00015.55
7.4.320.0050.00216.61
7.4.300.0030.00316.65
7.4.290.0070.00316.45
7.4.280.0060.00316.60
7.4.270.0070.00016.50
7.4.260.0030.00316.47
7.4.250.0070.00016.52
7.4.240.0000.00816.43
7.4.230.0030.00316.67
7.4.220.0110.01116.58
7.4.210.0060.01016.53
7.4.200.0040.00416.50
7.4.150.0110.00817.40
7.4.140.0120.00817.86
7.4.130.0080.01116.54
7.4.120.0100.00816.55
7.4.110.0140.01016.60
7.4.100.0050.01116.51
7.4.90.0030.01316.57
7.4.80.0130.01019.39
7.4.70.0100.00716.50
7.4.60.0070.01116.59
7.4.50.0070.00716.48
7.4.40.0080.00816.45
7.4.30.0110.00616.45
7.4.00.0080.00914.84
7.3.330.0000.00613.32
7.3.320.0030.00313.25
7.3.310.0070.00016.25
7.3.300.0000.00716.27
7.3.290.0040.00416.19
7.3.280.0100.00816.31
7.3.270.0140.00317.40
7.3.260.0070.01616.35
7.3.250.0080.01116.33
7.3.240.0130.00416.39
7.3.230.0120.00916.42
7.3.210.0050.01116.32
7.3.200.0100.00716.41
7.3.190.0200.00316.58
7.3.180.0130.01016.45
7.3.170.0120.00916.23
7.3.160.0160.00616.30
7.3.120.0110.00714.76
7.3.110.0060.01014.85
7.3.100.0040.01214.80
7.3.90.0040.00815.00
7.3.80.0030.01014.78
7.3.70.0050.00914.84
7.3.60.0080.00714.78
7.3.50.0050.00914.81
7.3.40.0050.00914.67
7.3.30.0060.00814.67
7.3.20.0030.01016.67
7.3.10.0050.00916.56
7.3.00.0050.00816.56
7.2.330.0130.00716.68
7.2.320.0060.01116.65
7.2.310.0080.00816.69
7.2.300.0060.01616.41
7.2.290.0070.01016.56
7.2.250.0090.00915.03
7.2.240.0100.00914.99
7.2.230.0080.00714.92
7.2.220.0040.01115.04
7.2.210.0040.01015.09
7.2.200.0050.00715.03
7.2.190.0080.00615.12
7.2.180.0040.01115.06
7.2.170.0060.00915.00
7.2.160.0030.00614.99
7.2.150.0000.01516.93
7.2.140.0060.00916.69
7.2.130.0070.00416.79
7.2.120.0030.01217.07
7.2.110.0050.00816.78
7.2.100.0030.01016.65
7.2.90.0060.00617.04
7.2.80.0030.00616.86
7.2.70.0110.00416.43
7.2.60.0060.00716.92
7.2.50.0030.00816.72
7.2.40.0030.01016.66
7.2.30.0030.01316.79
7.2.20.0100.00316.85
7.2.10.0000.01916.95
7.2.00.0100.00716.58
7.1.330.0050.01015.80
7.1.320.0060.00915.74
7.1.310.0060.00815.91
7.1.300.0030.01015.78
7.1.290.0060.00715.74
7.1.280.0060.00815.76
7.1.270.0080.00615.70
7.1.260.0050.00515.76
7.1.250.0000.01015.73
7.1.240.0100.00315.97
7.1.230.0060.00615.61
7.1.220.0030.01215.91
7.1.210.0030.01015.87
7.1.200.0080.00615.71
7.1.190.0000.00815.68
7.1.180.0000.01715.91
7.1.170.0120.00315.83
7.1.160.0060.01215.39
7.1.150.0140.00015.55
7.1.140.0060.00915.68
7.1.130.0040.01015.78
7.1.120.0060.00615.94
7.1.110.0030.01016.05
7.1.100.0090.00316.88
7.1.90.0070.00315.59
7.1.80.0130.00315.90
7.1.70.0060.00416.18
7.1.60.0050.00716.52
7.1.50.0050.01416.43
7.1.40.0060.00915.90
7.1.30.0060.00915.52
7.1.20.0760.04530.97
7.1.10.0580.03518.12
7.1.00.0590.04218.08
7.0.330.0090.00815.20
7.0.320.0000.01415.39
7.0.310.0070.00415.49
7.0.300.0030.01015.51
7.0.290.0000.01615.44
7.0.280.0040.00915.47
7.0.270.0070.01015.47
7.0.260.0040.01115.34
7.0.250.0030.00515.51
7.0.240.0060.00615.14
7.0.230.0150.00015.59
7.0.220.0120.00315.32
7.0.210.0060.00315.35
7.0.200.0070.00215.96
7.0.190.0100.00315.39
7.0.180.0070.00715.34
7.0.170.0060.00615.38
7.0.160.0530.03817.73
7.0.150.0550.04017.84
7.0.140.0500.03417.80
7.0.130.0720.04817.78
7.0.120.0520.02817.72
7.0.110.0520.03217.76
7.0.100.0530.03317.76
7.0.90.0590.03017.65
7.0.80.0440.03617.86
7.0.70.0420.03517.82
7.0.60.0770.03317.81
7.0.50.0430.03717.95
7.0.40.0440.03416.70
7.0.30.0500.02516.85
7.0.20.0470.02616.79
7.0.10.0420.03216.62
7.0.00.0380.03516.88
5.6.400.0040.00414.58
5.6.390.0080.00614.50
5.6.380.0030.00514.45
5.6.370.0040.00914.27
5.6.360.0070.01114.41
5.6.350.0030.01014.12
5.6.340.0030.01014.14
5.6.330.0030.00614.53
5.6.320.0030.01014.16
5.6.310.0060.00314.47
5.6.300.0060.00314.31
5.6.290.0030.01014.22
5.6.280.0100.00714.18
5.6.270.0100.00314.07
5.6.260.0040.00714.12
5.6.250.0000.01214.33
5.6.240.0060.00314.20
5.6.230.0100.00314.31
5.6.220.0000.01514.27
5.6.210.0030.01414.32
5.6.200.0110.00314.32
5.6.190.0030.00714.28
5.6.180.0090.00614.27
5.6.170.0070.00714.62
5.6.160.0040.00814.08
5.6.150.0040.01114.05
5.6.140.0100.00714.20
5.6.130.0090.00014.51
5.6.120.0040.00814.35
5.6.110.0040.01114.52
5.6.100.0000.00914.41
5.6.90.0030.00814.35
5.6.80.0100.00314.37
5.6.70.0060.00613.96
5.6.60.0070.00314.31
5.6.50.0090.00914.30
5.6.40.0030.01214.02
5.6.30.0080.00414.17
5.6.20.0000.01614.09
5.6.10.0070.00714.14
5.6.00.0040.00414.16

preferences:
59.34 ms | 400 KiB | 5 Q