3v4l.org

run code in 300+ PHP versions simultaneously
<?php // THIS IS SYNC CODE /** Make the calls **/ foreach ($callsToMake as $serverClients) { foreach ($serverClients as $keys) { /** @var ConnectionConfig $clientConfig */ $clientConfig = $keys['config']; /** Transport returns json **/ $transport = $this->transportFactory->build($this->client, $this->request, $clientConfig); /** Adapter returns Torrent objects **/ $adapter = $this->adapterFactory->build($transport); $torrents = array_merge($torrents, $adapter->getTorrents($keys['hashes'])); } } return $torrents; // TRYING TO MAKE IT ASYNC WITH $callable /** Make the calls **/ foreach ($callsToMake as $serverClients) { foreach ($serverClients as $keys) { /** @var ConnectionConfig $clientConfig */ $clientConfig = $keys['config']; /** Transport returns json **/ $transport = $this->transportFactory->build($this->client, $this->request, $clientConfig, $async = true); /** Adapter returns Torrent objects **/ $adapter = $this->adapterFactory->build($transport); $torrents = array_merge($torrents, $adapter->getTorrents($keys['hashes'], $callable)); // Obviously, this will only happen once } }

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.70.0150.00016.58
8.3.60.0030.01718.30
8.3.50.0160.00522.00
8.3.40.0110.00418.63
8.3.30.0110.00319.09
8.3.20.0080.00020.25
8.3.10.0000.00823.69
8.3.00.0050.00219.19
8.2.180.0140.00718.41
8.2.170.0110.00418.79
8.2.160.0100.00322.96
8.2.150.0040.01124.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0070.00021.00
8.2.110.0030.00720.31
8.2.100.0040.00717.72
8.2.90.0060.00319.23
8.2.80.0000.00817.97
8.2.70.0050.00317.63
8.2.60.0040.00417.93
8.2.50.0000.00918.07
8.2.40.0050.00318.03
8.2.30.0000.00918.20
8.2.20.0000.00817.80
8.2.10.0000.00717.94
8.2.00.0000.00817.57
8.1.280.0000.01425.92
8.1.270.0040.00423.76
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0060.00323.72
8.1.230.0030.00718.98
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0000.01017.13
8.1.190.0050.00317.10
8.1.180.0050.00318.10
8.1.170.0040.00418.53
8.1.160.0090.00021.96
8.1.150.0040.00418.55
8.1.140.0040.00417.31
8.1.130.0070.00017.76
8.1.120.0030.00417.34
8.1.110.0000.00717.38
8.1.100.0070.00017.41
8.1.90.0040.00417.43
8.1.80.0040.00417.29
8.1.70.0030.00317.22
8.1.60.0030.00617.43
8.1.50.0000.00817.41
8.1.40.0040.00417.39
8.1.30.0030.00617.60
8.1.20.0000.00817.55
8.1.10.0050.00217.39
8.1.00.0000.00717.30
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0070.00018.31
8.0.270.0030.00517.12
8.0.260.0030.00317.21
8.0.250.0030.00316.82
8.0.240.0000.00716.90
8.0.230.0040.00417.00
8.0.220.0070.00016.91
8.0.210.0030.00316.89
8.0.200.0000.00616.98
8.0.190.0000.00716.89
8.0.180.0040.00416.94
8.0.170.0000.00816.82
8.0.160.0050.00216.74
8.0.150.0070.00016.89
8.0.140.0000.00716.75
8.0.130.0050.00013.37
8.0.120.0040.00416.88
8.0.110.0000.00716.84
8.0.100.0000.00717.01
8.0.90.0000.00816.75
8.0.80.0140.00716.85
8.0.70.0000.00816.93
8.0.60.0000.00716.80
8.0.50.0040.00416.91
8.0.30.0110.00817.16
8.0.20.0100.01217.40
8.0.10.0070.00016.90
8.0.00.0090.01016.68
7.4.330.0000.00515.00
7.4.320.0030.00316.55
7.4.300.0060.00016.56
7.4.290.0000.00716.50
7.4.280.0050.00316.42
7.4.270.0000.00716.57
7.4.260.0040.00416.47
7.4.250.0040.00416.57
7.4.240.0070.00016.55
7.4.230.0000.00816.37
7.4.220.0080.00816.58
7.4.210.0130.00616.54
7.4.200.0070.00016.64
7.4.160.0040.01116.18
7.4.150.0230.03717.40
7.4.140.0080.01317.86
7.4.130.0100.01016.60
7.4.120.0130.00316.46
7.4.110.0080.00916.47
7.4.100.0150.00616.46
7.4.90.0110.00716.42
7.4.80.0100.00919.39
7.4.70.0130.00316.26
7.4.60.0130.00516.41
7.4.50.0030.00616.39
7.4.40.0090.00816.33
7.4.30.0030.01416.35
7.4.00.0100.00614.88
7.3.330.0000.00513.16
7.3.320.0050.00013.12
7.3.310.0070.00016.13
7.3.300.0040.00416.31
7.3.290.0050.00916.27
7.3.280.0120.00816.26
7.3.270.0060.01117.40
7.3.260.0100.01316.55
7.3.250.0140.00616.46
7.3.240.0100.01016.23
7.3.230.0040.01216.48
7.3.210.0100.00716.25
7.3.200.0100.00819.39
7.3.190.0070.01016.54
7.3.180.0100.00716.43
7.3.170.0030.01716.41
7.3.160.0060.01016.41
7.3.120.0070.01014.55
7.2.330.0060.01016.23
7.2.320.0090.00916.32
7.2.310.0060.01116.48
7.2.300.0000.01716.63
7.2.290.0060.01016.54
7.2.60.0070.00716.84
7.1.200.0030.00615.83
7.1.70.0030.00316.71
7.1.60.0070.01719.70
7.1.50.0100.01316.86
7.1.00.0030.07322.57
7.0.200.0230.00616.20
7.0.140.0000.07721.95
7.0.60.0000.04719.92
7.0.50.0070.08317.81
7.0.40.0100.03720.30
7.0.30.0230.03320.12
7.0.20.0200.08020.20
7.0.10.0170.08020.16
7.0.00.0030.08720.12
5.6.280.0030.07321.08
5.6.210.0130.07320.73
5.6.200.0100.08318.19
5.6.190.0130.06320.57
5.6.180.4170.04320.46
5.6.170.0200.07020.48
5.6.160.0070.08020.37
5.6.150.0130.04718.09
5.6.140.0030.04018.20
5.6.130.0030.05318.09
5.6.120.0070.08321.05
5.6.110.0130.07321.00
5.6.100.0070.05721.13
5.6.90.0000.06021.04
5.6.80.0100.08020.40
5.6.70.0270.05320.53
5.5.350.0130.08020.43
5.5.340.0070.04717.88
5.5.330.0100.08020.07
5.5.320.0530.05720.27
5.5.310.0200.05720.17
5.5.300.0030.05017.96
5.5.290.0030.04017.98
5.5.280.0070.08720.80
5.5.270.0130.06720.96
5.5.260.0100.03320.77
5.5.250.0000.05720.69
5.5.240.0170.06320.01
5.4.450.0730.06319.32
5.4.440.0730.06719.49
5.4.430.0800.05719.52
5.4.420.0800.00019.52
5.4.410.0070.05718.80
5.4.400.0300.05718.77
5.4.390.0300.05018.68
5.4.380.0200.06018.50
5.4.370.0400.04018.68
5.4.360.0100.04718.74
5.4.350.0100.03911.98
5.4.340.0070.04411.98
5.4.320.0060.03812.46
5.4.310.0050.04712.46
5.4.300.0080.05312.46
5.4.290.0110.05312.46
5.4.280.0140.04912.35
5.4.270.0160.04712.36
5.4.260.0100.05412.36
5.4.250.0140.05012.36
5.4.240.0120.05112.36
5.4.230.0100.06012.35
5.4.220.0070.05712.35
5.4.210.0090.05112.35
5.4.200.0150.05912.35
5.4.190.0110.05112.34
5.4.180.0080.05612.34
5.4.170.0080.05712.36
5.4.160.0120.05512.36
5.4.150.0100.05712.35
5.4.140.0090.06112.04
5.4.130.0160.04412.02
5.4.120.0120.05011.98
5.4.110.0100.05211.97
5.4.100.0170.05811.98
5.4.90.0120.05611.98
5.4.80.0160.04811.98
5.4.70.0120.06011.97
5.4.60.0100.04711.97
5.4.50.0120.05911.97
5.4.40.0090.05511.96
5.4.30.0070.05311.95
5.4.20.0130.05211.96
5.4.10.0120.05011.96
5.4.00.0160.06411.45
5.3.290.0070.04012.80
5.3.280.0100.05512.71
5.3.270.0150.08412.72
5.3.260.0140.08112.71
5.3.250.0070.06512.72
5.3.240.0100.05912.71
5.3.230.0110.05512.71
5.3.220.0090.05812.68
5.3.210.0120.05512.68
5.3.200.0080.05612.68
5.3.190.0090.05412.67
5.3.180.0070.05712.67
5.3.170.0180.06712.67
5.3.160.0130.05312.67
5.3.150.0140.05612.67
5.3.140.0220.09112.66
5.3.130.0100.06212.66
5.3.120.0060.05412.66
5.3.110.0070.04912.66
5.3.100.0100.06312.12
5.3.90.0070.06412.09
5.3.80.0140.04812.07
5.3.70.0070.05612.07
5.3.60.0130.05012.06
5.3.50.0060.05712.00
5.3.40.0100.05312.00
5.3.30.0120.05111.96
5.3.20.0130.05011.73
5.3.10.0070.05411.70
5.3.00.0110.05111.69
5.2.170.0170.0379.19
5.2.160.0170.0339.19
5.2.150.0120.0419.19
5.2.140.0120.0419.19
5.2.130.0200.0799.15
5.2.120.0150.0579.15
5.2.110.0140.0409.16
5.2.100.0080.0469.15
5.2.90.0090.0459.16
5.2.80.0040.0519.15
5.2.70.0060.0509.15
5.2.60.0080.0479.11
5.2.50.0090.0499.07
5.2.40.0040.0479.05
5.2.30.0120.0449.02
5.2.20.0060.0479.01
5.2.10.0060.0508.93
5.2.00.0090.0428.79
5.1.60.0090.0358.08
5.1.50.0060.0388.08
5.1.40.0040.0428.05
5.1.30.0080.0408.41
5.1.20.0110.0408.43
5.1.10.0050.0398.16
5.1.00.0070.0398.15
5.0.50.0200.0416.63
5.0.40.0100.0566.49
5.0.30.0110.0386.30
5.0.20.0060.0296.28
5.0.10.0080.0306.26
5.0.00.0090.0426.25
4.4.90.0050.0244.78
4.4.80.0040.0254.75
4.4.70.0080.0204.76
4.4.60.0040.0244.76
4.4.50.0060.0294.77
4.4.40.0030.0384.71
4.4.30.0070.0214.76
4.4.20.0050.0244.84
4.4.10.0080.0214.85
4.4.00.0020.0394.76
4.3.110.0030.0274.67
4.3.100.0050.0234.66
4.3.90.0030.0244.63
4.3.80.0040.0384.58
4.3.70.0030.0264.63
4.3.60.0020.0264.63
4.3.50.0070.0224.63
4.3.40.0050.0354.54
4.3.30.0070.0203.30
4.3.20.0030.0253.28
4.3.10.0040.0243.24
4.3.00.0100.0236.83

preferences:
32.16 ms | 401 KiB | 5 Q