3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "device_id=LA14011269&card_number=1073741835&mpb=1000&trans_time=1429443693&sessionId=1073741835LA140112691429443693&checksum=4"; echo checkBcc($str); function checkBcc($str, $check_sum) { $i=0; $checksum = 0; $result = false; $len = strlen($str); echo " str:".$str; $pBuf = explode($str); print_r($pBuf); for ($i = 0; $i < $len-2; $i++) { $checksum ^= $pBuf[$i]; } echo "checksum:". $checksum; if ($checksum == $check_sum) { $result = true; } return $result; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: Too few arguments to function checkBcc(), 1 passed in /in/lZqe7 on line 4 and exactly 2 expected in /in/lZqe7:6 Stack trace: #0 /in/lZqe7(4): checkBcc('device_id=LA140...') #1 {main} thrown in /in/lZqe7 on line 6
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
40.54 ms | 401 KiB | 8 Q