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() { $this->nextLongitude()->next(); return $this->nextLongitude()->current(); } } $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.0120.00318.23
8.3.50.0140.00016.47
8.3.40.0070.00718.81
8.3.30.0070.00718.89
8.3.20.0080.00021.76
8.3.10.0050.00321.88
8.3.00.0040.00420.90
8.2.180.0070.00718.20
8.2.170.0120.00322.96
8.2.160.0040.01122.16
8.2.150.0030.00524.18
8.2.140.0050.00324.66
8.2.130.0050.00320.35
8.2.120.0000.00826.35
8.2.110.0080.00320.94
8.2.100.0090.00317.78
8.2.90.0050.00317.75
8.2.80.0030.00617.97
8.2.70.0000.00917.93
8.2.60.0030.00618.16
8.2.50.0050.00318.10
8.2.40.0060.00320.59
8.2.30.0030.00619.26
8.2.20.0040.00417.97
8.2.10.0000.00718.05
8.2.00.0040.00417.95
8.1.280.0070.01425.92
8.1.270.0070.00324.02
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.96
8.1.230.0070.00320.28
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0000.01017.35
8.1.190.0040.00417.13
8.1.180.0080.00318.10
8.1.170.0000.00818.64
8.1.160.0000.00818.83
8.1.150.0070.00020.34
8.1.140.0050.00319.60
8.1.130.0030.00318.83
8.1.120.0040.00417.49
8.1.110.0070.00017.50
8.1.100.0040.00417.37
8.1.90.0070.00017.41
8.1.80.0050.00317.52
8.1.70.0070.00017.39
8.1.60.0040.00417.45
8.1.50.0040.00417.56
8.1.40.0000.00817.55
8.1.30.0030.00617.59
8.1.20.0040.00417.74
8.1.10.0040.00417.61
8.1.00.0070.00017.60
8.0.300.0040.00419.61
8.0.290.0030.00516.75
8.0.280.0040.00418.48
8.0.270.0030.00317.32
8.0.260.0030.00316.75
8.0.250.0070.00016.89
8.0.240.0000.00816.88
8.0.230.0040.00416.89
8.0.220.0000.00716.95
8.0.210.0030.00316.92
8.0.200.0030.00316.89
8.0.190.0040.00416.99
8.0.180.0000.00716.94
8.0.170.0030.00616.91
8.0.160.0000.00716.85
8.0.150.0030.00316.94
8.0.140.0000.00716.76
8.0.130.0000.00613.30
8.0.120.0080.00016.86
8.0.110.0000.00716.80
8.0.100.0000.00716.89
8.0.90.0070.00016.96
8.0.80.0060.01016.86
8.0.70.0040.00416.96
8.0.60.0070.00016.71
8.0.50.0000.00716.75
8.0.30.0070.01417.15
8.0.20.0100.00817.40
8.0.10.0040.00417.11
8.0.00.0130.00616.56
7.4.330.0030.00315.55
7.4.320.0000.00716.54
7.4.300.0000.00616.54
7.4.290.0080.00016.61
7.4.280.0000.00816.62
7.4.270.0000.00716.52
7.4.260.0000.00513.23
7.4.250.0000.00816.58
7.4.240.0030.00316.54
7.4.230.0000.00716.61
7.4.220.0060.01416.57
7.4.210.0030.01216.48
7.4.200.0070.00016.74
7.4.160.0080.00816.48
7.4.150.0070.01017.40
7.4.140.0130.00817.86
7.4.130.0000.01916.54
7.4.120.0100.00816.44
7.4.110.0090.00916.73
7.4.100.0070.01016.45
7.4.90.0130.00516.44
7.4.80.0120.01219.39
7.4.70.0160.00016.58
7.4.60.0080.00816.53
7.4.50.0090.00616.17
7.4.40.0060.01216.47
7.4.30.0060.00916.50
7.4.00.0120.00614.89
7.3.330.0030.00313.17
7.3.320.0050.00013.10
7.3.310.0030.00316.35
7.3.300.0030.00316.13
7.3.290.0050.00916.34
7.3.280.0060.00916.32
7.3.270.0060.01217.40
7.3.260.0100.01116.40
7.3.250.0110.01116.38
7.3.240.0090.01116.35
7.3.230.0140.00616.35
7.3.210.0100.00716.60
7.3.200.0130.00316.27
7.3.190.0060.01016.63
7.3.180.0100.00716.45
7.3.170.0030.01616.43
7.3.160.0070.01116.54
7.2.330.0070.01316.69
7.2.320.0090.00916.46
7.2.310.0090.00916.76
7.2.300.0070.01016.82
7.2.290.0100.00716.54
7.2.60.0280.00716.86
7.2.50.0060.00617.15
7.2.00.0030.00719.48
7.1.200.0070.00715.67
7.1.70.0030.00617.21
7.1.60.0370.01333.15
7.1.50.0430.01032.64
7.1.40.0630.01032.57
7.1.30.0330.01732.59
7.1.20.0500.00332.70
7.1.10.0230.00714.81
7.1.00.0200.01314.94
7.0.200.0300.00314.82
7.0.190.0300.01015.02
7.0.180.0430.01314.52
7.0.170.0230.00714.46
7.0.160.0300.00714.46
7.0.150.0200.01014.34
7.0.140.0200.01314.28
7.0.130.0200.01014.60
7.0.120.0270.01014.70
7.0.110.0330.01014.21
7.0.100.0330.01014.39
7.0.90.0230.00714.19
7.0.80.0370.01314.50
7.0.70.0270.00314.51
7.0.60.0200.01014.38
7.0.50.0230.01014.68
7.0.40.0200.01014.79
7.0.30.0200.01014.45
7.0.20.0270.01014.46
7.0.10.0370.01314.55
7.0.00.0870.01714.40

preferences:
59.67 ms | 400 KiB | 5 Q