3v4l.org

run code in 300+ PHP versions simultaneously
<?php $zipString = '8239;8252;8253;8254;8255;8259;8261;8262;8263;8467;8468;8476;8477;8525;8526;8537;8000;8001;8002;8003;8004;8005;8006;8010;8012;8015;8016;8020;8021;8022;8023;8024;8026;8027;8030;8031;8033;8034;8036;8037;8039;8040;8042;8044;8045;8046;8047;8048;8049;8050;8051;8052;8055;8057;8058;8059;8060;8061;8063;8064;8065;8066;8068;8070;8071;8074;8075;8080;8081;8085;8086;8087;8088;8090;8091;8092;8093;8096;8098;8099;8102;8103;8104;8105;8106;8107;8108;8112;8113;8114;8115;8142;8152;8153;8154;8155;8156;8157;8158;8162;8164;8165;8166;8172;8173;8174;8175;8180;8181;8182;8184;8185;8187;8192;8193;8194;8195;8196;8197;8201;8202;8203;8204;8205;8207;8208;8210;8212;8213;8214;8215;8216;8217;8218;8219;8222;8223;8224;8225;8226;8228;8231;8232;8233;8234;8235;8236;8240;8241;8242;8243;8245;8246;8247;8248;8302;8303;8304;8305;8306;8307;8309;8310;8311;8312;8314;8315;8317;8352;8353;8354;8355;8356;8357;8400;8401;8402;8404;8405;8406;8408;8409;8410;8411;8412;8413;8414;8415;8416;8418;8421;8422;8424;8425;8426;8427;8428;8442;8444;8447;8450;8451;8452;8453;8454;8455;8457;8458;8459;8460;8461;8462;8463;8464;8465;8466;8471;8472;8474;8475;8478;8479;8482;8483;8522;8523;8542;8543;8544;8545;8546;8547;8548;8600;8602;4900;4901;4902;4911;4912;4913;4914;4915;4916;4922;4923;8865;8866;8867;8868;8872;8873;8874;8877;8878;8880;7320;8008;8011;8032;8038;8041;8053;8109;8117;8118;8121;8122;8123;8124;8125;8126;8127;8130;8132;8133;8134;8135;8136;8143;8200;8301;8308;8320;8322;8330;8331;8332;8335;8340;8342;8343;8344;8345;8360;8362;8363;8370;8372;8374;8376;8484;8486;8487;8488;8489;8492;8493;8494;8495;8496;8497;8498;8499;8603;8604;8605;8606;8607;8608;8610;8612;8613;8614;8615;8616;8617;8618;8620;8621;8622;8623;8624;8625;8626;8627;8630;8632;8633;8634;8635;8636;8637;8638;8639;8640;8645;8646;8700;8702;8703;8704;8706;8707;8708;8712;8713;8714;8715;8716;8717;8718;8722;8723;8725;8726;8727;8730;8732;8733;8734;8735;8737;8738;8739;8740;8800;8801;8802;8803;8804;8805;8806;8807;8808;8810;8812;8813;8815;8820;8750;8752;8753;8754;8755;8756;8757;8758;8881;8882;8883;8884;8885;8886;8887;8888;8889;8890;8892;8893;8894;8895;8896;8897;8898;8832;8835;8844;8845;8846;8847;8852;8853;8854;8855;8856;8857;8858;8862;8863;8864;4302;4303;4304;4305;4310;4312;4313;4314;4315;4316;4317;4322;4323;4324;4325;4332;4333;4334;4600;4601;4603;4609;4612;4613;4614;4615;4616;4617;4618;4622;4623;4624;4625;4626;4628;4629;4632;4633;4634;4652;4653;4654;4655;4656;4657;4658;4663;4665;4702;4703;4704;4710;4717;4718;4719;4800;4801;4802;4803;4805;4806;4807;4808;4809;4812;4813;4814;4852;4853;4856;5000;5010;5012;5013;5014;5015;5017;5018;5022;5023;5024;5025;5026;5027;5028;5032;5033;5034;5035;5036;5037;5040;5042;5043;5044;5046;5053;5054;5056;5057;5058;5062;5063;5064;5070;5072;5073;5074;5075;5076;5077;5078;5079;5080;5082;5083;5084;5085;5102;5103;5105;5106;5107;5108;5112;5113;5116;5200;5201;5210;5212;5213;5222;5223;5224;5225;5232;5233;5234;5235;5236;5237;5242;5243;5244;5245;5246;5272;5273;5274;5275;5276;5277;5300;5301;5303;5304;5305;5306;5312;5313;5314;5315;5316;5317;5318;5322;5323;5324;5325;5326;5330;5332;5333;5334;5400;5404;5405;5406;5408;5412;5413;5415;5416;5417;5420;5423;5425;5426;5430;5431;5432;5436;5442;5443;5444;5445;5452;5453;5454;5462;5463;5464;5465;5466;5467;5502;5503;5504;5505;5506;5507;5510;5512;5522;5524;5525;5600;5601;5603;5604;5605;5606;5607;5608;5610;5611;5612;5613;5614;5615;5616;5617;5618;5619;5620;5621;5622;5623;5624;5625;5626;5627;5628;5630;5632;5634;5636;5637;5642;5643;5644;5645;5646;5647;5702;5703;5704;5705;5706;5707;5708;5712;5722;5723;5724;5725;5726;5727;5728;5732;5733;5734;5735;5736;5737;5742;5745;5746;6024;6025;6026;6027;6028;6034;6038;6042;6145;6146;6147;6211;6215;6221;6222;6231;6232;6233;6234;6235;6236;6244;6245;6246;6252;6253;6260;6262;6263;6264;6265;6277;6280;6281;6283;6284;6285;6286;6287;6288;6289;6294;6295;8901;8902;8903;8904;8905;8906;8907;8908;8909;8910;8911;8912;8913;8916;8917;8918;8919;8942;8951;8952;8953;8954;8955;8956;8957;8962;8964;8965;8966;8967;8970;4402;4410;4411;4412;4413;4414;4415;4416;4417;4418;4419;4421;4422;4423;4424;4425;4426;4431;4432;4433;4434;4435;4436;4437;4438;4441;4442;4443;4444;4445;4446;4447;4448;4450;4451;4452;4453;4455;4456;4457;4458;4460;4461;4462;4463;4464;4465;4466;4467;4468;4469;4492;4493;4494;4495;4496;4497;6274;6275;6276;6300;6301;6302;6303;6304;6310;6312;6313;6314;6315;6317;6318;6319;6330;6331;6332;6333;6340;6343;6344;6345;6405;6410;6414;6415;6416;6417;6418;6422;6423;6424;6430;6431;6432;6433;6434;6438;6440;6442;6443;8816;8824;8825;8833;8834;8836;8840;8841;8842;8843;8849;8914;8915;8925;8926;8932;8933;8934;8934'; $zips = array_unique(array_map(fn(string $zip) => (int) $zip, explode(';', $zipString))); sort($zips); $start = $zips[0]; $ranges = []; foreach ($zips as $i => $zip) { $nextIndex = $i + 1; $nextProjectedZip = $zip + 1; if (!isset($zips[$nextIndex]) || ($nextProjectedZip !== $zips[$nextIndex])) { $ranges[] = ['from' => (string) $start, 'to' => (string) ($zip + 1)]; if (isset($zips[$nextIndex])) { $start = (string) $zips[$nextIndex]; } } } echo json_encode($ranges);

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.0200.00318.43
8.3.50.0130.00318.70
8.3.40.0040.01120.22
8.3.30.0140.00718.78
8.3.20.0090.00024.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.180.0090.00625.92
8.2.170.0110.00719.22
8.2.160.0040.01122.96
8.2.150.0000.00825.66
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00026.16
8.2.110.0070.00422.16
8.2.100.0090.00318.16
8.2.90.0090.00317.83
8.2.80.0030.00617.75
8.2.70.0000.00817.75
8.2.60.0030.00518.05
8.2.50.0000.01018.07
8.2.40.0000.00918.47
8.2.30.0000.01118.36
8.2.20.0000.00720.73
8.2.10.0040.00418.54
8.2.00.0040.00419.54
8.1.280.0120.00325.92
8.1.270.0050.00324.66
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00421.02
8.1.230.0110.00021.29
8.1.220.0050.00318.04
8.1.210.0030.00619.23
8.1.200.0100.00017.60
8.1.190.0050.00317.48
8.1.180.0060.00318.10
8.1.170.0030.00618.87
8.1.160.0000.00719.09
8.1.150.0000.00818.85
8.1.140.0050.00317.70
8.1.130.0060.00917.66
8.1.120.0100.00517.64
8.1.110.0110.00417.73
8.1.100.0060.01117.77
8.1.90.0110.00417.71
8.1.80.0160.00017.64
8.1.70.0100.00017.72
8.1.60.0040.00417.77
8.1.50.0000.01017.79
8.1.40.0140.00417.82
8.1.30.0130.00417.87
8.1.20.0060.01117.79
8.1.10.0140.00417.82
8.1.00.0000.01717.63
8.0.300.0000.00720.29
8.0.290.0040.00417.00
8.0.280.0030.00318.61
8.0.270.0000.00817.43
8.0.260.0050.01116.95
8.0.250.0100.00616.98
8.0.240.0050.01017.03
8.0.230.0120.00217.05
8.0.220.0110.00416.98
8.0.210.0150.00017.05
8.0.200.0090.00617.01
8.0.190.0140.00317.02
8.0.180.0090.00717.12
8.0.170.0100.00516.95
8.0.160.0070.00716.95
8.0.150.0100.00517.02
8.0.140.0040.00916.95
8.0.130.0110.00017.06
8.0.120.0110.00317.02
8.0.110.0120.00216.98
8.0.100.0120.00016.98
8.0.90.0000.01116.95
8.0.80.0090.00016.98
8.0.70.0040.00416.95
8.0.60.0040.00416.96
8.0.50.0000.00817.02
8.0.30.0000.00716.95
8.0.20.0040.00417.00
8.0.10.0040.00417.14

preferences:
49.14 ms | 400 KiB | 5 Q