Based on httpclient version 4.4.1
Because http connections require three handshakes, resources and time are wasted when frequent calls are required
Therefore, the connection pool is used to connect
Change according to actual needs Maximum number of connections in the connection pool and maximum number of connections in the routing
Another thing to note is
// 释放Socket流 response.close(); // 释放Connection // httpClient.close();<br><br>
<span style="color: #008080"> 1</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.HttpEntity; </span><span style="color: #008080"> 2</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.NameValuePair; </span><span style="color: #008080"> 3</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.client.config.RequestConfig; </span><span style="color: #008080"> 4</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.client.entity.UrlEncodedFormEntity; </span><span style="color: #008080"> 5</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.client.methods.CloseableHttpResponse; </span><span style="color: #008080"> 6</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.client.methods.HttpGet; </span><span style="color: #008080"> 7</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.client.methods.HttpPost; </span><span style="color: #008080"> 8</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.client.methods.HttpRequestBase; </span><span style="color: #008080"> 9</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.client.utils.URIBuilder; </span><span style="color: #008080"> 10</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.config.SocketConfig; </span><span style="color: #008080"> 11</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.entity.StringEntity; </span><span style="color: #008080"> 12</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.impl.client.CloseableHttpClient; </span><span style="color: #008080"> 13</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.impl.client.HttpClients; </span><span style="color: #008080"> 14</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.impl.conn.PoolingHttpClientConnectionManager; </span><span style="color: #008080"> 15</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.message.BasicNameValuePair; </span><span style="color: #008080"> 16</span> <span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.http.util.EntityUtils; </span><span style="color: #008080"> 17</span> <span style="color: #008080"> 18</span> <span style="color: #0000ff">import</span><span style="color: #000000"> java.io.IOException; </span><span style="color: #008080"> 19</span> <span style="color: #0000ff">import</span><span style="color: #000000"> java.io.UnsupportedEncodingException; </span><span style="color: #008080"> 20</span> <span style="color: #0000ff">import</span><span style="color: #000000"> java.net.URISyntaxException; </span><span style="color: #008080"> 21</span> <span style="color: #0000ff">import</span><span style="color: #000000"> java.util.ArrayList; </span><span style="color: #008080"> 22</span> <span style="color: #0000ff">import</span><span style="color: #000000"> java.util.Map; </span><span style="color: #008080"> 23</span> <span style="color: #008080"> 24</span> <span style="color: #008000">/**</span> <span style="color: #008080"> 25</span> <span style="color: #008000"> * Created by lidada on 2017/6/9. </span><span style="color: #008080"> 26</span> <span style="color: #008000">*/</span> <span style="color: #008080"> 27</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span><span style="color: #000000"> HttpClientUtils { </span><span style="color: #008080"> 28</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span><span style="color: #000000"> PoolingHttpClientConnectionManager cm; </span><span style="color: #008080"> 29</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> String EMPTY_STR = ""<span style="color: #000000">; </span><span style="color: #008080"> 30</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> String CONTENT_TYPE_UTF_8 = "UTF-8"<span style="color: #000000">; </span><span style="color: #008080"> 31</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> String CONTENT_TYPE_GBK = "GBK"<span style="color: #000000">; </span><span style="color: #008080"> 32</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> String CONTENT_TYPE_JSON = "application/json"<span style="color: #000000">; </span><span style="color: #008080"> 33</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">final</span> <span style="color: #0000ff">int</span> CONNECTION_TIMEOUT_MS = 60000<span style="color: #000000">; </span><span style="color: #008080"> 34</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">final</span> <span style="color: #0000ff">int</span> SO_TIMEOUT_MS = 60000<span style="color: #000000">; </span><span style="color: #008080"> 35</span> <span style="color: #008080"> 36</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span><span style="color: #000000"> init() { </span><span style="color: #008080"> 37</span> <span style="color: #0000ff">if</span> (cm == <span style="color: #0000ff">null</span><span style="color: #000000">) { </span><span style="color: #008080"> 38</span> cm = <span style="color: #0000ff">new</span><span style="color: #000000"> PoolingHttpClientConnectionManager(); </span><span style="color: #008080"> 39</span> cm.setMaxTotal(50);<span style="color: #008000">//</span><span style="color: #008000"> 整个连接池最大连接数</span> <span style="color: #008080"> 40</span> cm.setDefaultMaxPerRoute(5);<span style="color: #008000">//</span><span style="color: #008000"> 每路由最大连接数,默认值是2</span> <span style="color: #008080"> 41</span> SocketConfig sc =<span style="color: #000000"> SocketConfig.custom().setSoTimeout(SO_TIMEOUT_MS).build(); </span><span style="color: #008080"> 42</span> <span style="color: #000000"> cm.setDefaultSocketConfig(sc); </span><span style="color: #008080"> 43</span> <span style="color: #000000"> } </span><span style="color: #008080"> 44</span> <span style="color: #000000"> } </span><span style="color: #008080"> 45</span> <span style="color: #008080"> 46</span> <span style="color: #008000">/**</span> <span style="color: #008080"> 47</span> <span style="color: #008000"> * 通过连接池获取HttpClient </span><span style="color: #008080"> 48</span> <span style="color: #008000"> * </span><span style="color: #008080"> 49</span> <span style="color: #008000"> * </span><span style="color: #808080">@return</span> <span style="color: #008080"> 50</span> <span style="color: #008000">*/</span> <span style="color: #008080"> 51</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span><span style="color: #000000"> CloseableHttpClient getHttpClient() { </span><span style="color: #008080"> 52</span> <span style="color: #000000"> init(); </span><span style="color: #008080"> 53</span> <span style="color: #0000ff">return</span> HttpClients.custom().setConnectionManager(cm).setConnectionManagerShared(<span style="color: #0000ff">true</span><span style="color: #000000">) .build(); </span><span style="color: #008080"> 54</span> <span style="color: #000000"> } </span><span style="color: #008080"> 55</span> <span style="color: #008080"> 56</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span><span style="color: #000000"> String httpGetRequest(String url) { </span><span style="color: #008080"> 57</span> HttpGet httpGet = <span style="color: #0000ff">new</span><span style="color: #000000"> HttpGet(url); </span><span style="color: #008080"> 58</span> <span style="color: #0000ff">return</span><span style="color: #000000"> getResult(httpGet); </span><span style="color: #008080"> 59</span> <span style="color: #000000"> } </span><span style="color: #008080"> 60</span> <span style="color: #008080"> 61</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> String httpGetRequest(String url, Map<string object> params) <span style="color: #0000ff">throws</span><span style="color: #000000"> URISyntaxException { </span><span style="color: #008080"> 62</span> URIBuilder ub = <span style="color: #0000ff">new</span><span style="color: #000000"> URIBuilder(); </span><span style="color: #008080"> 63</span> <span style="color: #000000"> ub.setPath(url); </span><span style="color: #008080"> 64</span> <span style="color: #008080"> 65</span> ArrayList<namevaluepair> pairs =<span style="color: #000000"> covertParams2NVPS(params); </span><span style="color: #008080"> 66</span> <span style="color: #000000"> ub.setParameters(pairs); </span><span style="color: #008080"> 67</span> <span style="color: #008080"> 68</span> HttpGet httpGet = <span style="color: #0000ff">new</span><span style="color: #000000"> HttpGet(ub.build()); </span><span style="color: #008080"> 69</span> <span style="color: #0000ff">return</span><span style="color: #000000"> getResult(httpGet); </span><span style="color: #008080"> 70</span> <span style="color: #000000"> } </span><span style="color: #008080"> 71</span> <span style="color: #008080"> 72</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> String httpGetRequest(String url, Map<string object> headers, Map<string object><span style="color: #000000"> params) </span><span style="color: #008080"> 73</span> <span style="color: #0000ff">throws</span><span style="color: #000000"> URISyntaxException { </span><span style="color: #008080"> 74</span> URIBuilder ub = <span style="color: #0000ff">new</span><span style="color: #000000"> URIBuilder(); </span><span style="color: #008080"> 75</span> <span style="color: #000000"> ub.setPath(url); </span><span style="color: #008080"> 76</span> <span style="color: #008080"> 77</span> ArrayList<namevaluepair> pairs =<span style="color: #000000"> covertParams2NVPS(params); </span><span style="color: #008080"> 78</span> <span style="color: #000000"> ub.setParameters(pairs); </span><span style="color: #008080"> 79</span> <span style="color: #008080"> 80</span> HttpGet httpGet = <span style="color: #0000ff">new</span><span style="color: #000000"> HttpGet(ub.build()); </span><span style="color: #008080"> 81</span> <span style="color: #0000ff">for</span> (Map.Entry<string object><span style="color: #000000"> param : headers.entrySet()) { </span><span style="color: #008080"> 82</span> <span style="color: #000000"> httpGet.addHeader(param.getKey(), String.valueOf(param.getValue())); </span><span style="color: #008080"> 83</span> <span style="color: #000000"> } </span><span style="color: #008080"> 84</span> <span style="color: #0000ff">return</span><span style="color: #000000"> getResult(httpGet); </span><span style="color: #008080"> 85</span> <span style="color: #000000"> } </span><span style="color: #008080"> 86</span> <span style="color: #008080"> 87</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span><span style="color: #000000"> String httpPostRequest(String url) { </span><span style="color: #008080"> 88</span> HttpPost httpPost = <span style="color: #0000ff">new</span><span style="color: #000000"> HttpPost(url); </span><span style="color: #008080"> 89</span> <span style="color: #0000ff">return</span><span style="color: #000000"> getResult(httpPost); </span><span style="color: #008080"> 90</span> <span style="color: #000000"> } </span><span style="color: #008080"> 91</span> <span style="color: #008080"> 92</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> String httpPostRequest(String url, Map<string object> params) <span style="color: #0000ff">throws</span><span style="color: #000000"> UnsupportedEncodingException { </span><span style="color: #008080"> 93</span> HttpPost httpPost = <span style="color: #0000ff">new</span><span style="color: #000000"> HttpPost(url); </span><span style="color: #008080"> 94</span> ArrayList<namevaluepair> pairs =<span style="color: #000000"> covertParams2NVPS(params); </span><span style="color: #008080"> 95</span> httpPost.setEntity(<span style="color: #0000ff">new</span><span style="color: #000000"> UrlEncodedFormEntity(pairs, CONTENT_TYPE_UTF_8)); </span><span style="color: #008080"> 96</span> <span style="color: #0000ff">return</span><span style="color: #000000"> getResult(httpPost); </span><span style="color: #008080"> 97</span> <span style="color: #000000"> } </span><span style="color: #008080"> 98</span> <span style="color: #008080"> 99</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> String httpPostRequest(String url, Map<string object> headers, Map<string object><span style="color: #000000"> params) </span><span style="color: #008080">100</span> <span style="color: #0000ff">throws</span><span style="color: #000000"> UnsupportedEncodingException { </span><span style="color: #008080">101</span> HttpPost httpPost = <span style="color: #0000ff">new</span><span style="color: #000000"> HttpPost(url); </span><span style="color: #008080">102</span> <span style="color: #008080">103</span> <span style="color: #0000ff">for</span> (Map.Entry<string object><span style="color: #000000"> param : headers.entrySet()) { </span><span style="color: #008080">104</span> <span style="color: #000000"> httpPost.addHeader(param.getKey(), String.valueOf(param.getValue())); </span><span style="color: #008080">105</span> <span style="color: #000000"> } </span><span style="color: #008080">106</span> <span style="color: #008080">107</span> ArrayList<namevaluepair> pairs =<span style="color: #000000"> covertParams2NVPS(params); </span><span style="color: #008080">108</span> httpPost.setEntity(<span style="color: #0000ff">new</span><span style="color: #000000"> UrlEncodedFormEntity(pairs, CONTENT_TYPE_UTF_8)); </span><span style="color: #008080">109</span> <span style="color: #008080">110</span> <span style="color: #0000ff">return</span><span style="color: #000000"> getResult(httpPost); </span><span style="color: #008080">111</span> <span style="color: #000000"> } </span><span style="color: #008080">112</span> <span style="color: #008080">113</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> String httpPostJSON(String url, String json) <span style="color: #0000ff">throws</span><span style="color: #000000"> UnsupportedEncodingException { </span><span style="color: #008080">114</span> HttpPost httpPost = <span style="color: #0000ff">new</span><span style="color: #000000"> HttpPost(url); </span><span style="color: #008080">115</span> StringEntity s = <span style="color: #0000ff">new</span><span style="color: #000000"> StringEntity(json); </span><span style="color: #008080">116</span> <span style="color: #000000"> s.setContentEncoding(CONTENT_TYPE_UTF_8); </span><span style="color: #008080">117</span> s.setContentType(CONTENT_TYPE_JSON);<span style="color: #008000">//</span><span style="color: #008000"> 发送json数据需要设置contentType</span> <span style="color: #008080">118</span> <span style="color: #000000"> httpPost.setEntity(s); </span><span style="color: #008080">119</span> <span style="color: #0000ff">return</span><span style="color: #000000"> getResult(httpPost); </span><span style="color: #008080">120</span> <span style="color: #000000"> } </span><span style="color: #008080">121</span> <span style="color: #008080">122</span> <span style="color: #008080">123</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> ArrayList<namevaluepair> covertParams2NVPS(Map<string object><span style="color: #000000"> params) { </span><span style="color: #008080">124</span> ArrayList<namevaluepair> pairs = <span style="color: #0000ff">new</span> ArrayList<span style="color: #000000">(); </span><span style="color: #008080">125</span> <span style="color: #0000ff">for</span> (Map.Entry<string object><span style="color: #000000"> param : params.entrySet()) { </span><span style="color: #008080">126</span> pairs.add(<span style="color: #0000ff">new</span><span style="color: #000000"> BasicNameValuePair(param.getKey(), String.valueOf(param.getValue()))); </span><span style="color: #008080">127</span> <span style="color: #000000"> } </span><span style="color: #008080">128</span> <span style="color: #008080">129</span> <span style="color: #0000ff">return</span><span style="color: #000000"> pairs; </span><span style="color: #008080">130</span> <span style="color: #000000"> } </span><span style="color: #008080">131</span> <span style="color: #008080">132</span> <span style="color: #008000">/**</span> <span style="color: #008080">133</span> <span style="color: #008000"> * 处理Http请求 </span><span style="color: #008080">134</span> <span style="color: #008000"> * </span><span style="color: #008080">135</span> <span style="color: #008000"> * </span><span style="color: #808080">@param</span><span style="color: #008000"> request </span><span style="color: #008080">136</span> <span style="color: #008000"> * </span><span style="color: #808080">@return</span> <span style="color: #008080">137</span> <span style="color: #008000">*/</span> <span style="color: #008080">138</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span><span style="color: #000000"> String getResult(HttpRequestBase request) { </span><span style="color: #008080">139</span> <span style="color: #008080">140</span> RequestConfig.Builder config =<span style="color: #000000"> RequestConfig.copy(RequestConfig.DEFAULT); </span><span style="color: #008080">141</span> <span style="color: #000000"> config.setConnectionRequestTimeout(CONNECTION_TIMEOUT_MS); </span><span style="color: #008080">142</span> <span style="color: #000000"> config.setSocketTimeout(SO_TIMEOUT_MS); </span><span style="color: #008080">143</span> <span style="color: #008080">144</span> <span style="color: #000000"> request.setConfig(config.build()); </span><span style="color: #008080">145</span> <span style="color: #008080">146</span> <span style="color: #008000">//</span><span style="color: #008000"> CloseableHttpClient httpClient = HttpClients.createDefault();</span> <span style="color: #008080">147</span> CloseableHttpClient httpClient =<span style="color: #000000"> getHttpClient(); </span><span style="color: #008080">148</span> CloseableHttpResponse response = <span style="color: #0000ff">null</span><span style="color: #000000">; </span><span style="color: #008080">149</span> <span style="color: #0000ff">try</span><span style="color: #000000"> { </span><span style="color: #008080">150</span> response =<span style="color: #000000"> httpClient.execute(request); </span><span style="color: #008080">151</span> <span style="color: #008000">//</span><span style="color: #008000"> response.getStatusLine().getStatusCode();</span> <span style="color: #008080">152</span> HttpEntity entity =<span style="color: #000000"> response.getEntity(); </span><span style="color: #008080">153</span> <span style="color: #0000ff">if</span> (entity != <span style="color: #0000ff">null</span><span style="color: #000000">) { </span><span style="color: #008080">154</span> <span style="color: #008000">//</span><span style="color: #008000"> long len = entity.getContentLength();</span><span style="color: #008000">//</span><span style="color: #008000"> -1 表示长度未知</span> <span style="color: #008080">155</span> <span style="color: #0000ff">return</span><span style="color: #000000"> EntityUtils.toString(entity); </span><span style="color: #008080">156</span> <span style="color: #000000"> } </span><span style="color: #008080">157</span> } <span style="color: #0000ff">catch</span><span style="color: #000000"> (IOException e) { </span><span style="color: #008080">158</span> <span style="color: #000000"> e.printStackTrace(); </span><span style="color: #008080">159</span> } <span style="color: #0000ff">finally</span><span style="color: #000000"> { </span><span style="color: #008080">160</span> <span style="color: #0000ff">try</span><span style="color: #000000"> { </span><span style="color: #008080">161</span> <span style="color: #008000">//</span><span style="color: #008000"> 释放Socket流</span> <span style="color: #008080">162</span> <span style="color: #000000"> response.close(); </span><span style="color: #008080">163</span> <span style="color: #008000">//</span><span style="color: #008000"> 释放Connection </span><span style="color: #008080">164</span> <span style="color: #008000">//</span><span style="color: #008000"> httpClient.close();</span> <span style="color: #008080">165</span> } <span style="color: #0000ff">catch</span><span style="color: #000000"> (IOException e) { </span><span style="color: #008080">166</span> <span style="color: #000000"> e.printStackTrace(); </span><span style="color: #008080">167</span> <span style="color: #000000"> } </span><span style="color: #008080">168</span> <span style="color: #000000"> } </span><span style="color: #008080">169</span> <span style="color: #008080">170</span> <span style="color: #0000ff">return</span><span style="color: #000000"> EMPTY_STR; </span><span style="color: #008080">171</span> <span style="color: #000000"> } </span><span style="color: #008080">172</span> <span style="color: #008080">173</span> }</string></namevaluepair></string></namevaluepair></namevaluepair></string></string></string></namevaluepair></string></string></namevaluepair></string></string></namevaluepair></string>
The above is the detailed content of org.apache.httpcomponents:httpclient utility class. For more information, please follow other related articles on the PHP Chinese website!

Javaremainsagoodlanguageduetoitscontinuousevolutionandrobustecosystem.1)Lambdaexpressionsenhancecodereadabilityandenablefunctionalprogramming.2)Streamsallowforefficientdataprocessing,particularlywithlargedatasets.3)ThemodularsystemintroducedinJava9im

Javaisgreatduetoitsplatformindependence,robustOOPsupport,extensivelibraries,andstrongcommunity.1)PlatformindependenceviaJVMallowscodetorunonvariousplatforms.2)OOPfeatureslikeencapsulation,inheritance,andpolymorphismenablemodularandscalablecode.3)Rich

The five major features of Java are polymorphism, Lambda expressions, StreamsAPI, generics and exception handling. 1. Polymorphism allows objects of different classes to be used as objects of common base classes. 2. Lambda expressions make the code more concise, especially suitable for handling collections and streams. 3.StreamsAPI efficiently processes large data sets and supports declarative operations. 4. Generics provide type safety and reusability, and type errors are caught during compilation. 5. Exception handling helps handle errors elegantly and write reliable software.

Java'stopfeaturessignificantlyenhanceitsperformanceandscalability.1)Object-orientedprincipleslikepolymorphismenableflexibleandscalablecode.2)Garbagecollectionautomatesmemorymanagementbutcancauselatencyissues.3)TheJITcompilerboostsexecutionspeedafteri

The core components of the JVM include ClassLoader, RuntimeDataArea and ExecutionEngine. 1) ClassLoader is responsible for loading, linking and initializing classes and interfaces. 2) RuntimeDataArea contains MethodArea, Heap, Stack, PCRegister and NativeMethodStacks. 3) ExecutionEngine is composed of Interpreter, JITCompiler and GarbageCollector, responsible for the execution and optimization of bytecode.

Java'ssafetyandsecurityarebolsteredby:1)strongtyping,whichpreventstype-relatederrors;2)automaticmemorymanagementviagarbagecollection,reducingmemory-relatedvulnerabilities;3)sandboxing,isolatingcodefromthesystem;and4)robustexceptionhandling,ensuringgr

Javaoffersseveralkeyfeaturesthatenhancecodingskills:1)Object-orientedprogrammingallowsmodelingreal-worldentities,exemplifiedbypolymorphism.2)Exceptionhandlingprovidesrobusterrormanagement.3)Lambdaexpressionssimplifyoperations,improvingcodereadability

TheJVMisacrucialcomponentthatrunsJavacodebytranslatingitintomachine-specificinstructions,impactingperformance,security,andportability.1)TheClassLoaderloads,links,andinitializesclasses.2)TheExecutionEngineexecutesbytecodeintomachineinstructions.3)Memo


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Notepad++7.3.1
Easy-to-use and free code editor

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
