3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $isNoAnwser = "1"; $isBusy = "1"; $isFailed = "0"; $whereDisposArray = array(); if($isBusy == 1) array_push($whereDisposArray, "disposition='BUSY'"); if($isNoAnwser == 1) array_push($whereDisposArray, "disposition='ANSWERED'"); if($isFailed == 1) array_push($whereDisposArray, "disposition='FAILED'"); $s=''; $i=0; foreach ($whereDisposArray as $value) { if($i == 0) $s = $s . $value; if($i != 0) $s = $s . " or " . $value; $i++; } print_r($s);
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
disposition='BUSY' or disposition='ANSWERED'
Output for hhvm-3.10.0

Process exited with code 153.