3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function assignValuesFromText( $sIn, $dVat = null ){ $aRet = array(); $aPieces = explode( '@@', $sIn ); while ( list( $sKey, $sVal ) = each( $aPieces ) ) { if ( $sVal ) { $aName = explode( '__', $sVal ); if ( isset( $aName[0] ) && isset( $aName[1] ) ) { //$aRet[] = $this->_fillExplodeArray( $aName, $dVat ); } } } return $aRet; } function test($input){ $Ret = array(); return $Ret; } $string = "Schwarz__@@Weiß__@@Schön!P!10__@@Cool!P!50%__@@"; echo print_r(test($string),true);
based on SLG2f
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( )