3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'https://www.tiny.com.br/api2/produtos.pesquisa.php'; $token = '6134695a443b60856faf745793258745e3328a33'; $pesquisa = 'xxxxx'; $data = "token=$token&pesquisa=$pesquisa&formato=XML"; enviarREST($url, $data); function enviarREST($url, $data, $optional_headers = null) { $params = array('http' => array( 'method' => 'POST', 'content' => $data )); if ($optional_headers !== null) { $params['http']['header'] = $optional_headers; } $ctx = stream_context_create($params); $fp = @fopen($url, 'rb', false, $ctx); if (!$fp) { throw new Exception("Problema com $url, $php_errormsg"); } $response = @stream_get_contents($fp); if ($response === false) { throw new Exception("Problema obtendo retorno de $url, $php_errormsg"); } return $response; }

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.0110.01117.00
8.3.50.0160.00718.42
8.3.40.0090.01218.79
8.3.30.0140.00718.89
8.3.20.0100.00720.35
8.3.10.0050.00323.39
8.3.00.0040.00419.34
8.2.180.0060.00918.41
8.2.170.0090.00622.96
8.2.160.0060.00920.39
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00317.63
8.2.120.0040.00426.35
8.2.110.0080.00421.17
8.2.100.0120.00017.75
8.2.90.0050.00319.17
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0030.00517.90
8.2.50.0030.00618.07
8.2.40.0050.00319.34
8.2.30.0050.00220.61
8.2.20.0060.00317.88
8.2.10.0040.00418.09
8.2.00.0050.00318.08
8.1.280.0090.00625.92
8.1.270.0000.01023.82
8.1.260.0100.00728.09
8.1.250.0080.00028.09
8.1.240.0060.00322.14
8.1.230.0090.00317.77
8.1.220.0000.00817.74
8.1.210.0080.00418.77
8.1.200.0000.00917.38
8.1.190.0000.00817.23
8.1.180.0000.00918.10
8.1.170.0030.00518.58
8.1.160.0000.00722.07
8.1.150.0070.00018.90
8.1.140.0000.00819.59
8.1.130.0000.00717.59
8.1.120.0040.00417.51
8.1.110.0070.00017.48
8.1.100.0000.00717.52
8.1.90.0000.00817.48
8.1.80.0040.00417.43
8.1.70.0040.00417.48
8.1.60.0070.00017.57
8.1.50.0030.00617.44
8.1.40.0080.00017.49
8.1.30.0080.00017.57
8.1.20.0080.00017.65
8.1.10.0030.00517.55
8.1.00.0040.00417.51
8.0.300.0040.00418.77
8.0.290.0070.00016.88
8.0.280.0070.00018.46
8.0.270.0000.00717.25
8.0.260.0030.00317.26
8.0.250.0000.00717.17
8.0.240.0050.00316.99
8.0.230.0000.00717.04
8.0.220.0040.00417.02
8.0.210.0040.00416.99
8.0.200.0060.00017.05
8.0.190.0000.00717.08
8.0.180.0000.00716.97
8.0.170.0000.01017.05
8.0.160.0000.00717.07
8.0.150.0000.00716.93
8.0.140.0040.00716.95
8.0.130.0060.00013.48
8.0.120.0000.00816.93
8.0.110.0040.00417.09
8.0.100.0000.00716.93
8.0.90.0000.00716.83
8.0.80.0070.01017.07
8.0.70.0040.00416.97
8.0.60.0000.00816.95
8.0.50.0040.00417.05
8.0.30.0110.01017.04
8.0.20.0130.00717.40
8.0.10.0020.00517.00
8.0.00.0100.00916.76
7.4.330.0050.00016.70
7.4.320.0000.00616.52
7.4.300.0000.00616.47
7.4.290.0030.00316.58
7.4.280.0000.00816.66
7.4.270.0070.00016.52
7.4.260.0000.00716.41
7.4.250.0030.00516.51
7.4.240.0020.00516.58
7.4.230.0070.00016.72
7.4.220.0070.01816.61
7.4.210.0100.00416.53
7.4.200.0070.00016.34
7.4.160.0060.01016.75
7.4.150.0100.00717.40
7.4.140.0130.00917.86
7.4.130.0090.00916.59
7.4.120.0080.01316.59
7.4.110.0100.01016.52
7.4.100.0130.00616.49
7.4.90.0060.01216.41
7.4.80.0090.00919.39
7.4.70.0040.01416.61
7.4.60.0090.00616.59
7.4.50.0040.00716.50
7.4.40.0100.00716.46
7.4.30.0090.01316.64
7.4.10.0100.00714.80
7.4.00.0090.00614.99
7.3.330.0030.00313.40
7.3.320.0030.00313.41
7.3.310.0040.00416.30
7.3.300.0050.00216.36
7.3.290.0100.00716.40
7.3.280.0120.01316.44
7.3.270.0130.00417.40
7.3.260.0030.01316.54
7.3.250.0070.01216.45
7.3.240.0090.01116.62
7.3.230.0110.00816.39
7.3.210.0060.01016.52
7.3.200.0060.01016.41
7.3.190.0070.01016.51
7.3.180.0100.00716.44
7.3.170.0060.01616.59
7.3.160.0120.01016.68
7.3.130.0040.01514.93
7.3.120.0090.00914.92
7.3.110.0080.00814.77
7.3.100.0100.00714.65
7.3.90.0070.00715.07
7.3.80.0040.00814.84
7.3.70.0040.00414.89
7.3.60.0080.00814.66
7.3.50.0130.00014.88
7.3.40.0070.00714.98
7.3.30.0030.00914.90
7.3.20.0100.00316.46
7.3.10.0100.00716.68
7.3.00.0000.01716.66
7.2.330.0070.01116.55
7.2.320.0060.01916.70
7.2.310.0000.01716.80
7.2.300.0110.00716.71
7.2.290.0090.01116.82
7.2.260.0100.01015.09
7.2.250.0030.01314.88
7.2.240.0040.01015.24
7.2.230.0030.01314.99
7.2.220.0040.01115.05
7.2.210.0080.00414.85
7.2.200.0070.00715.22
7.2.190.0030.00715.04
7.2.180.0000.00914.73
7.2.170.0000.01315.15
7.2.160.0000.00915.25
7.2.150.0040.00817.12
7.2.140.0070.01117.12
7.2.130.0030.00916.72
7.2.120.0090.00616.74
7.2.110.0060.01017.05
7.2.100.0140.00416.93
7.2.90.0080.00816.86
7.2.80.0040.00716.87
7.2.70.0140.00017.05
7.2.60.0100.00216.95
7.2.50.0040.00816.91
7.2.40.0100.00617.11
7.2.30.0000.01317.13
7.2.20.0090.00417.09
7.2.10.0000.01416.96
7.2.00.0070.00918.35
7.1.330.0040.01115.94
7.1.320.0030.01015.96
7.1.310.0150.00016.06
7.1.300.0000.01415.85
7.1.290.0080.00415.86
7.1.280.0030.00615.96
7.1.270.0000.00915.88
7.1.260.0030.00715.58
7.1.250.0080.00615.88
7.1.240.0100.00315.54
7.1.230.0070.00715.93
7.1.220.0030.00715.87
7.1.210.0100.00315.92
7.1.200.0070.00415.74
7.1.190.0070.00715.94
7.1.180.0100.00315.80
7.1.170.0000.01315.91
7.1.160.0070.00315.92
7.1.150.0060.00915.78
7.1.140.0060.00915.97
7.1.130.0030.01015.80
7.1.120.0030.00715.82
7.1.110.0040.01115.62
7.1.100.0020.01116.94
7.1.90.0090.00615.69
7.1.80.0030.00715.84
7.1.70.0060.00716.54
7.1.60.0130.00817.52
7.1.50.0100.00616.62
7.1.40.0040.00816.02
7.1.30.0000.01515.78
7.1.20.0040.01115.69
7.1.10.0030.00815.91
7.1.00.0070.04019.19
7.0.330.0040.00915.17
7.0.320.0060.00315.29
7.0.310.0040.00715.54
7.0.300.0070.00715.36
7.0.290.0040.00815.52
7.0.280.0060.00615.25
7.0.270.0000.01115.55
7.0.260.0090.00615.63
7.0.250.0100.00715.48
7.0.240.0030.01015.54
7.0.230.0040.00715.12
7.0.220.0000.00815.42
7.0.210.0040.01115.57
7.0.200.0030.00816.24
7.0.190.0040.00815.43
7.0.180.0100.00615.50
7.0.170.0110.00315.26
7.0.160.0030.01015.53
7.0.150.0100.00315.27
7.0.140.0060.00915.58
7.0.130.0090.00015.27
7.0.120.0030.00715.59
7.0.110.0090.00015.46
7.0.100.0060.00615.36
7.0.90.0090.00615.39
7.0.80.0040.00815.45
7.0.70.0030.00615.46
7.0.60.0030.04917.94
7.0.50.0060.04016.96
7.0.40.0110.04017.15
7.0.30.0250.03716.98
7.0.20.0130.02817.00
7.0.10.0090.01816.92
7.0.00.0080.02616.91
5.6.400.0000.01213.86
5.6.390.0000.00814.00
5.6.380.0070.00714.17
5.6.370.0030.00914.25
5.6.360.0070.00714.61
5.6.350.0000.01714.68
5.6.340.0060.00914.46
5.6.330.0030.00614.54
5.6.320.0060.01214.01
5.6.310.0110.00414.27
5.6.300.0030.00614.46
5.6.290.0100.00714.23
5.6.280.0020.04217.80
5.6.270.0110.00614.71
5.6.260.0000.01414.38
5.6.250.0040.01114.38
5.6.240.0040.00814.50
5.6.230.0070.01114.34
5.6.220.0060.00614.07
5.6.210.0020.02417.56
5.6.200.0110.04116.30
5.6.190.0040.04217.79
5.6.180.0290.03717.66
5.6.170.0180.02617.50
5.6.160.0070.02517.60
5.6.150.0040.03416.35
5.6.140.0050.04516.27
5.6.130.0050.04516.40
5.6.120.0030.03317.84
5.6.110.0130.03017.97
5.6.100.0090.04417.92
5.6.90.0070.04617.72
5.6.80.0080.04317.66
5.6.70.0110.00414.33
5.6.60.0060.00914.39
5.6.50.0030.00614.44
5.6.40.0120.00314.43
5.6.30.0060.00914.50
5.6.20.0030.01014.38
5.6.10.0100.00314.09
5.6.00.0000.00914.35
5.5.380.0070.00714.18
5.5.370.0000.01413.90
5.5.360.0090.00614.38
5.5.350.1470.01917.54
5.5.340.0100.03716.25
5.5.330.0060.03017.55
5.5.320.0030.03017.41
5.5.310.0150.02817.38
5.5.300.0120.04316.23
5.5.290.0050.03416.15
5.5.280.0050.03417.68
5.5.270.0050.05017.83
5.5.260.0130.04017.66
5.5.250.0130.03517.57
5.5.240.0160.04217.40
5.5.230.0030.01414.10
5.5.220.0030.01214.25
5.5.210.0000.01314.20
5.5.200.0090.00614.32
5.5.190.0030.00914.20
5.5.180.0040.00414.08
5.5.170.0100.00014.30
5.5.160.0030.00714.11
5.5.150.0000.01314.21
5.5.140.0030.00913.90
5.5.130.0060.00314.28
5.5.120.0030.00614.19
5.5.110.0060.00613.94
5.5.100.0130.00014.30
5.5.90.0070.00714.30
5.5.80.0090.00014.29
5.5.70.0030.01014.09
5.5.60.0040.00814.18
5.5.50.0000.01414.21
5.5.40.0080.00014.17
5.5.30.0060.00814.25
5.5.20.0130.00014.09
5.5.10.0000.01213.98
5.5.00.0060.01013.72

preferences:
54.55 ms | 400 KiB | 5 Q