3v4l.org

run code in 300+ PHP versions simultaneously
<?php class testing { protected $latitudes = [2,4,6,8,10]; protected $longitudes = [3,6,9,12,15]; public function __construct() { } private function nextLatitude() { yield from $this->latitudes; } public function getLatitude() { foreach($this->nextLatitude() as $latitude) { return $latitude; } } private function nextLongitude() { yield from $this->longitudes; } public function getLongitude() { return $this->nextLongitude(); } } $x = new testing(); echo $x->getLatitude(), PHP_EOL; echo $x->getLongitude(), PHP_EOL, PHP_EOL; echo $x->getLatitude(), PHP_EOL; echo $x->getLongitude(), PHP_EOL, PHP_EOL; echo $x->getLatitude(), PHP_EOL; echo $x->getLongitude(), PHP_EOL, PHP_EOL;

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.0090.00918.30
8.3.50.0080.00816.49
8.3.40.0060.00918.76
8.3.30.0120.00618.83
8.3.20.0080.00021.87
8.3.10.0030.00621.90
8.3.00.0030.00620.90
8.2.180.0070.01318.54
8.2.170.0120.00322.96
8.2.160.0110.00722.29
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00022.13
8.2.120.0080.00026.35
8.2.110.0030.00620.39
8.2.100.0060.00618.03
8.2.90.0050.00317.75
8.2.80.0030.00517.97
8.2.70.0000.00818.04
8.2.60.0070.00318.22
8.2.50.0040.00418.10
8.2.40.0040.00422.32
8.2.30.0050.00319.21
8.2.20.0040.00417.97
8.2.10.0080.00018.09
8.2.00.0070.00018.12
8.1.280.0130.00725.92
8.1.270.0050.00523.80
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00623.88
8.1.230.0080.00419.04
8.1.220.0030.00517.74
8.1.210.0090.00018.77
8.1.200.0030.00917.35
8.1.190.0090.00017.23
8.1.180.0000.00818.10
8.1.170.0130.00018.09
8.1.160.0040.00418.91
8.1.150.0050.00320.29
8.1.140.0000.00819.61
8.1.130.0000.00718.86
8.1.120.0070.00017.50
8.1.110.0070.00017.38
8.1.100.0070.00017.38
8.1.90.0030.00617.43
8.1.80.0040.00417.45
8.1.70.0030.00317.51
8.1.60.0000.00717.63
8.1.50.0040.00417.49
8.1.40.0040.00417.52
8.1.30.0030.00517.57
8.1.20.0040.00417.66
8.1.10.0030.00517.57
8.1.00.0040.00417.53
8.0.300.0040.00419.65
8.0.290.0040.00416.71
8.0.280.0000.00718.39
8.0.270.0000.00717.33
8.0.260.0060.00016.96
8.0.250.0040.00416.97
8.0.240.0030.00616.90
8.0.230.0000.00716.91
8.0.220.0030.00317.01
8.0.210.0030.00316.98
8.0.200.0030.00317.03
8.0.190.0060.00317.04
8.0.180.0040.00417.03
8.0.170.0030.00616.90
8.0.160.0080.00016.88
8.0.150.0030.00316.98
8.0.140.0000.00816.84
8.0.130.0030.00313.41
8.0.120.0050.00316.88
8.0.110.0030.00517.02
8.0.100.0000.00816.93
8.0.90.0040.00416.86
8.0.80.0070.01416.89
8.0.70.0000.00816.88
8.0.60.0050.00316.95
8.0.50.0030.00517.03
8.0.30.0100.00817.05
8.0.20.0130.00517.40
8.0.10.0000.00717.03
8.0.00.0090.00916.87
7.4.330.0060.00015.55
7.4.320.0030.00316.65
7.4.300.0030.00316.50
7.4.290.0080.00016.43
7.4.280.0050.00316.67
7.4.270.0030.00316.59
7.4.260.0060.00013.27
7.4.250.0040.00416.47
7.4.240.0070.00016.59
7.4.230.0030.00316.51
7.4.220.0090.00916.73
7.4.210.0110.00716.59
7.4.200.0000.00716.53
7.4.160.0130.00816.65
7.4.150.0110.01117.40
7.4.140.0080.01117.86
7.4.130.0090.01316.57
7.4.120.0090.01116.62
7.4.110.0070.01116.52
7.4.100.0090.00916.63
7.4.90.0140.00316.43
7.4.80.0170.00919.39
7.4.70.0110.00716.47
7.4.60.0130.00916.77
7.4.50.0040.01516.57
7.4.40.0110.00516.74
7.4.30.0100.00616.38
7.4.00.0090.00915.01
7.3.330.0020.00213.25
7.3.320.0050.00013.41
7.3.310.0000.00716.20
7.3.300.0070.00016.36
7.3.290.0060.01216.40
7.3.280.0070.00916.35
7.3.270.0100.00717.40
7.3.260.0090.00816.43
7.3.250.0100.00916.35
7.3.240.0080.01116.50
7.3.230.0120.00616.40
7.3.210.0030.01316.52
7.3.200.0100.00616.33
7.3.190.0090.00916.58
7.3.180.0030.01316.57
7.3.170.0060.01016.33
7.3.160.0170.00316.43
7.3.120.0050.01214.78
7.3.110.0080.00914.70
7.3.100.0100.00214.84
7.3.90.0060.00914.79
7.3.80.0080.00614.96
7.3.70.0100.00614.64
7.3.60.0080.00514.67
7.3.50.0110.00514.76
7.3.40.0050.00814.80
7.3.30.0040.00714.66
7.3.20.0030.01016.69
7.3.10.0080.00716.50
7.3.00.0060.00616.57
7.2.330.0100.00716.56
7.2.320.0080.00816.83
7.2.310.0140.00316.81
7.2.300.0100.00716.61
7.2.290.0100.00716.57
7.2.250.0110.00815.23
7.2.240.0070.01015.02
7.2.230.0000.01515.05
7.2.220.0060.00915.19
7.2.210.0110.00515.07
7.2.200.0090.00215.23
7.2.190.0050.01015.02
7.2.180.0080.00615.11
7.2.170.0120.00515.12
7.2.130.0000.01216.96
7.2.120.0000.01016.68
7.2.110.0030.01016.95
7.2.100.0040.00817.00
7.2.90.0090.00616.95
7.2.80.0070.00316.86
7.2.70.0100.00317.02
7.2.60.0080.00816.73
7.2.50.0050.00616.87
7.2.40.0040.01516.69
7.2.30.0080.00517.07
7.2.20.0040.00817.08
7.2.10.0100.00316.89
7.2.00.0060.00818.26
7.1.330.0050.01015.57
7.1.320.0030.00915.68
7.1.310.0070.00815.68
7.1.300.0050.01015.55
7.1.290.0030.00815.54
7.1.280.0100.00615.45
7.1.270.0040.00615.52
7.1.260.0080.00715.70
7.1.250.0090.00615.73
7.1.200.0040.00715.75
7.1.70.0040.00416.89
7.1.60.0530.01333.25
7.1.50.0370.01732.98
7.1.40.0370.01332.56
7.1.30.0930.01732.48
7.1.20.0370.01732.51
7.1.10.0300.01714.62
7.1.00.0670.00714.52
7.0.200.0300.01015.06
7.0.190.0330.00714.62
7.0.180.0230.01314.36
7.0.170.0300.01014.48
7.0.160.0330.01014.60
7.0.150.0500.00714.58
7.0.140.0500.00714.40
7.0.130.0330.01314.70
7.0.120.0370.01014.74
7.0.110.0370.00314.49
7.0.100.0370.00314.42
7.0.90.0330.01014.36
7.0.80.0330.01014.52
7.0.70.0270.01314.37
7.0.60.0370.00714.02
7.0.50.0330.01014.59
7.0.40.0330.01314.61
7.0.30.0300.01014.59
7.0.20.0330.01014.64
7.0.10.0400.01014.58
7.0.00.0330.01014.56

preferences:
57.07 ms | 401 KiB | 5 Q