3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(5); $pic1="crackcha.jpg"; $pic2="crackcha_bw.jpg"; $cookie="WC4_SID=226191-7-hrfgW0Qp400r8xRF"; $url="http://www.wechall.net/challenge/crackcha/index.php"; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_COOKIE, $cookie); curl_setopt($ch, CURLOPT_URL, $url); $res=curl_exec ($ch); curl_close($ch); //echo $res,"<br>"; $busca1="/dbimg/crackcha/"; $busca2=' alt="Crackcha"'; $donde1=strpos($res,$busca1)+16; $donde2=strpos($res,$busca2,$donde1)-1; $urlpic="http://www.wechall.net/dbimg/crackcha/".substr($res,$donde1,$donde2-$donde1); //echo $urlpic; save_image($urlpic,$pic1); $im1=imagecreatefromjpeg($pic1); $ancho=imagesx($im1); $alto=imagesy($im1); $im2=imagecreatetruecolor($ancho,$alto); $b=imagecolorallocate($im2,0,0,0);//black $w=imagecolorallocate($im2,255,255,255);//white $treshold=90; //convert to black & white for($x=0;$x<$ancho;$x++){ for($y=0;$y<$alto;$y++){ $rgb = imagecolorat($im1, $x, $y); $r = ($rgb >> 16) & 0xFF; if($r < $treshold){ imagesetpixel($im2,$x,$y,$b); }else{ imagesetpixel($im2,$x,$y,$w); } } } header('Content-Type: image/jpeg'); imagejpeg($im2); imagedestroy($im1); imagedestroy($im2); function cleardots($im,$x,$y){ global $im1; global $x; global $y; $values=array("","","","","","","",""); $count=0; } function save_image($inPath,$outPath){ //Download images from remote server $in= fopen($inPath, "rb"); $out= fopen($outPath, "wb"); while ($chunk = fread($in,8192)) { fwrite($out, $chunk, 8192); } fclose($in); fclose($out); } ?>

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.00716.38
8.3.50.0130.00822.82
8.3.40.0180.00018.82
8.3.30.0150.00319.05
8.3.20.0040.00420.21
8.3.10.0040.00420.68
8.3.00.0080.00019.50
8.2.180.0150.00416.50
8.2.170.0210.00018.91
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00421.10
8.2.110.0030.00620.35
8.2.100.0040.00817.91
8.2.90.0040.00419.17
8.2.80.0040.00419.25
8.2.70.0040.00417.38
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0030.00518.03
8.2.20.0030.00517.65
8.2.10.0040.00418.21
8.2.00.0030.00517.67
8.1.280.0060.00925.92
8.1.270.0060.00323.96
8.1.260.0090.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00723.83
8.1.230.0090.00320.95
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0100.00017.13
8.1.190.0000.00817.41
8.1.180.0000.00919.01
8.1.170.0000.00818.59
8.1.160.0050.00322.18
8.1.150.0000.00718.95
8.1.140.0080.00017.41
8.1.130.0000.00717.86
8.1.120.0040.00417.40
8.1.110.0040.00417.42
8.1.100.0000.00717.48
8.1.90.0040.00417.38
8.1.80.0000.00717.47
8.1.70.0000.00717.42
8.1.60.0080.00417.53
8.1.50.0040.00417.55
8.1.40.0000.00817.54
8.1.30.0040.00417.72
8.1.20.0050.00317.64
8.1.10.0000.00817.59
8.1.00.0040.00417.53
8.0.300.0080.00018.77
8.0.290.0000.00717.30
8.0.280.0030.00318.41
8.0.270.0040.00416.78
8.0.260.0030.00317.27
8.0.250.0000.00716.99
8.0.240.0000.00817.04
8.0.230.0030.00416.97
8.0.220.0070.00016.83
8.0.210.0000.00716.98
8.0.200.0000.00716.98
8.0.190.0000.00816.96
8.0.180.0030.00416.86
8.0.170.0060.00316.81
8.0.160.0030.00317.03
8.0.150.0000.00816.90
8.0.140.0040.00416.79
8.0.130.0000.00513.34
8.0.120.0030.00516.87
8.0.110.0030.00516.88
8.0.100.0040.00416.96
8.0.90.0000.00716.84
8.0.80.0100.01016.91
8.0.70.0050.00316.88
8.0.60.0040.00416.81
8.0.50.0040.00417.05
8.0.30.0110.00817.12
8.0.20.0160.00617.40
8.0.10.0050.00316.94
8.0.00.0080.00916.69
7.4.330.0030.00315.00
7.4.320.0030.00316.58
7.4.300.0030.00316.65
7.4.290.0040.00416.61
7.4.280.0000.00816.52
7.4.270.0040.00416.55
7.4.260.0030.00313.33
7.4.250.0040.00416.50
7.4.240.0060.00116.51
7.4.230.0000.00716.38
7.4.220.0050.01316.59
7.4.210.0050.00916.68
7.4.200.0030.00316.63
7.4.160.0140.00416.63
7.4.150.0060.01217.40
7.4.140.0110.00917.86
7.4.130.0080.00816.52
7.4.120.0130.00616.49
7.4.110.0070.01016.60
7.4.100.0100.01016.39
7.4.90.0120.00416.48
7.4.80.0070.01119.39
7.4.70.0080.00816.63
7.4.60.0110.00816.50
7.4.50.0000.00816.40
7.4.40.0140.00416.55
7.4.30.0100.00716.45
7.4.00.0050.01215.09
7.3.330.0000.00513.21
7.3.320.0070.00013.27
7.3.310.0000.00716.25
7.3.300.0030.00316.19
7.3.290.0080.00616.37
7.3.280.0120.00316.33
7.3.270.0070.01017.40
7.3.260.0180.00316.23
7.3.250.0110.00816.48
7.3.240.0000.01616.25
7.3.230.0100.00716.59
7.3.210.0100.01316.48
7.3.200.0100.00719.39
7.3.190.0090.00916.49
7.3.180.0130.01116.25
7.3.170.0070.01016.39
7.3.160.0140.00816.43
7.3.120.0140.00414.65
7.3.110.0080.00814.88
7.3.100.0070.00714.79
7.3.90.0040.01114.95
7.3.80.0030.01314.62
7.3.70.0030.00914.86
7.3.60.0030.01014.65
7.3.50.0000.01414.51
7.3.40.0040.00814.83
7.3.30.0150.00014.88
7.3.20.0090.00316.64
7.3.10.0070.00716.55
7.3.00.0070.01016.63
7.2.330.0070.01016.67
7.2.320.0030.01316.70
7.2.310.0060.01016.64
7.2.300.0110.01216.70
7.2.290.0030.01416.69
7.2.250.0090.00915.00
7.2.240.0040.01515.01
7.2.230.0110.00715.00
7.2.220.0090.00614.62
7.2.210.0120.00614.52
7.2.200.0100.00314.68
7.2.190.0060.00914.73
7.2.180.0070.01414.82
7.2.170.0060.00914.87
7.2.80.0030.01016.43
7.2.60.0050.00516.57
7.2.00.0090.00318.96
7.1.330.0070.00715.58
7.1.320.0120.00315.79
7.1.310.0040.01415.66
7.1.300.0080.00615.60
7.1.290.0000.01215.53
7.1.280.0030.00715.81
7.1.270.0070.00715.55
7.1.260.0030.01215.67
7.1.200.0120.00015.43
7.1.100.0040.01118.26
7.1.70.0080.00017.39
7.1.60.0110.00417.39
7.1.50.0090.00317.39
7.1.40.0030.01017.39
7.1.30.0100.00317.39
7.1.20.0080.00417.39
7.1.10.0040.01217.39
7.1.00.0000.00817.39
7.0.200.0030.00617.39
7.0.190.0040.00417.39
7.0.180.0000.01017.39
7.0.170.0030.00617.39
7.0.160.0080.00417.39
7.0.150.0020.01017.39
7.0.140.0000.01017.39
7.0.130.0000.01217.39
7.0.120.0050.00517.39
7.0.110.0040.00817.39
7.0.100.0070.00717.39
7.0.90.0070.01117.39
7.0.80.0080.00817.39
7.0.70.0000.00917.39
7.0.60.0000.01017.39
7.0.50.0030.01117.39
7.0.40.0090.00917.39
7.0.30.0050.00517.39
7.0.20.0000.01117.39
7.0.10.0000.01017.39
7.0.00.0000.00817.39
5.6.300.0280.04620.92
5.6.290.0000.04520.70
5.6.280.0070.04020.89
5.6.270.0130.04021.10
5.6.260.0060.05721.10
5.6.250.0030.05821.00
5.6.240.0130.04321.00
5.6.230.0100.04420.96
5.6.220.0070.04620.82
5.6.210.0000.04420.62
5.6.200.0100.05820.96
5.6.190.0070.04720.80
5.6.180.0190.04221.02
5.6.170.0030.07720.80
5.6.160.0000.04620.87
5.6.150.0030.04820.98
5.6.140.0030.04520.79
5.6.130.0000.05121.00
5.6.120.0000.04921.00
5.6.110.0000.04720.84
5.6.100.0000.05220.82
5.6.90.0030.04320.73
5.6.80.0100.03520.43
5.6.70.0100.03420.12
5.6.60.0060.03620.32
5.6.50.0060.03520.33
5.6.40.0100.03120.36
5.6.30.0070.03820.33
5.6.20.0030.04020.38
5.6.10.0070.03920.21
5.6.00.0090.03120.16
5.5.380.0160.07317.49
5.5.370.0140.07517.55
5.5.360.0030.04317.62
5.5.350.0030.04417.58
5.5.340.0100.03318.03
5.5.330.0000.07818.04
5.5.320.0070.03918.09
5.5.310.0100.07218.09
5.5.300.0030.04018.09
5.5.290.0000.05118.07
5.5.280.0030.04518.13
5.5.270.0070.03617.83
5.5.260.0000.04718.09
5.5.250.0090.03517.51
5.5.240.0030.03617.39
5.5.230.0030.03817.51
5.5.220.0000.04717.41
5.5.210.0030.03717.50
5.5.200.0000.04517.39
5.5.190.0060.03517.44
5.5.180.0000.04217.45
5.5.160.0060.03417.48
5.5.150.0030.03717.39
5.5.140.0140.04117.39
5.5.130.0070.03717.39
5.5.120.0070.03817.48
5.5.110.0030.04317.39
5.5.100.0070.04217.39
5.5.90.0070.04017.39
5.5.80.0030.03617.39
5.5.70.0030.04417.39
5.5.60.0090.03117.39
5.5.50.0040.04217.39
5.5.40.0060.04117.39
5.5.30.0030.04017.39
5.5.20.0060.03917.39
5.5.10.0000.05717.39
5.5.00.0030.04017.39
5.4.450.0000.04619.23
5.4.440.0000.04319.25
5.4.430.0000.04619.38
5.4.420.0040.04019.53
5.4.410.0060.03619.18
5.4.400.0000.04119.08
5.4.390.0060.03919.00
5.4.380.0090.03419.09
5.4.370.0070.03619.07
5.4.360.0000.04419.04
5.4.350.0060.04219.08
5.4.340.0030.04419.09
5.4.320.0000.04219.24
5.4.310.0060.03719.14
5.4.300.0030.04118.98
5.4.290.0070.03719.03
5.4.280.0060.03519.07
5.4.270.0170.04019.08
5.4.260.0090.03518.89
5.4.250.0000.05219.14
5.4.240.0030.04119.11
5.4.230.0070.04019.09
5.4.220.0070.04119.08
5.4.210.0030.04219.20
5.4.200.0000.04419.10
5.4.190.0250.03419.08
5.4.180.0000.04119.08
5.4.170.0000.03918.97
5.4.160.0030.03819.09
5.4.150.0070.03318.97
5.4.140.0060.04517.39
5.4.130.0000.07517.39
5.4.120.0030.07117.39
5.4.110.0070.05317.39
5.4.100.0030.06817.39
5.4.90.0030.03917.39
5.4.80.0030.08317.39
5.4.70.0030.04017.39
5.4.60.0030.03517.39
5.4.50.0100.03217.39
5.4.40.0030.03917.39
5.4.30.0060.03617.39
5.4.20.0030.03817.39
5.4.10.0030.03717.39
5.4.00.0000.04117.39
5.3.290.0000.04117.39
5.3.280.0040.03917.39
5.3.270.0070.06317.39
5.3.260.0000.04917.39
5.3.250.0030.05117.39
5.3.240.0030.05517.39
5.3.230.0100.06517.39
5.3.220.0030.07717.39
5.3.210.0100.04817.39
5.3.200.0100.06817.39
5.3.190.0030.07417.39
5.3.180.0030.04617.39
5.3.170.0000.06517.39
5.3.160.0000.05017.39
5.3.150.0030.06217.39
5.3.140.0000.07417.39
5.3.130.0030.06417.39
5.3.120.0040.04617.39
5.3.110.0100.04117.39
5.3.100.0030.03617.39
5.3.90.0000.04017.39
5.3.80.0100.03517.39
5.3.70.0030.03817.39
5.3.60.0060.03417.39
5.3.50.0000.03817.39
5.3.40.0000.03817.39
5.3.30.0000.03817.39
5.3.20.0030.07217.39
5.3.10.0030.03617.39
5.3.00.0070.03317.39
5.2.170.0060.02917.39
5.2.160.0030.03317.39
5.2.150.0030.03817.39
5.2.140.0030.06217.39
5.2.130.0030.03217.39
5.2.120.0000.04217.39
5.2.110.0030.03017.39
5.2.100.0000.03017.39
5.2.90.0030.02817.39
5.2.80.0160.02217.39
5.2.70.0060.02917.39
5.2.60.0030.03017.39
5.2.50.0000.04417.39
5.2.40.0000.03017.39
5.2.30.0000.03017.39
5.2.20.0030.02817.39
5.2.10.0030.03617.39
5.2.00.0030.06117.39
5.1.60.0000.04817.39
5.1.50.0030.05117.39
5.1.40.0030.03417.39
5.1.30.0000.05117.39
5.1.20.0000.04017.39
5.1.10.0000.03117.39
5.1.00.0000.05817.39
5.0.50.0070.01717.39
5.0.40.0060.04117.39
5.0.30.0030.04117.39
5.0.20.0070.01617.39
5.0.10.0070.01617.39
5.0.00.0000.03417.39
4.4.90.0000.01917.39
4.4.80.0000.01817.39
4.4.70.0030.02517.39
4.4.60.0000.01817.39
4.4.50.0000.02917.39
4.4.40.0030.03817.39
4.4.30.0000.01617.39
4.4.20.0000.01617.39
4.4.10.0000.03917.39
4.4.00.0000.02617.39
4.3.110.0030.03617.39
4.3.100.0030.03517.39
4.3.90.0000.03517.39
4.3.80.0000.03017.39
4.3.70.0000.02317.39
4.3.60.0000.01817.39
4.3.50.0030.01517.39
4.3.40.0000.03017.39
4.3.30.0060.01217.39
4.3.20.0000.01817.39
4.3.10.0200.00717.39
4.3.00.0000.02317.39

preferences:
48.25 ms | 401 KiB | 5 Q