From:             
Operating system: Irrelevant
PHP version:      Irrelevant
Package:          Unknown/Other Function
Bug Type:         Feature/Change Request
Bug description:explode with an Array as Delimiter

Description:
------------
It would be useful if you were able to pass an Array as Delimiter to
explode.

The "Test Script" contains an Example.

Test script:
---------------
<?php



  var_dump(explode(array(',', '.', '!', ' '), 'Hello, World! This is a
Test!'));

  /*



    Should output something like:

      array(8) {

        [0]=>

        string(5) "Hello"

        [1]=>

        string(0) ""

        [2]=>

        string(5) "World"

        [3]=>

        string(0) ""

        [4]=>

        string(4) "This"

        [5]=>

        string(2) "is"

        [6]=>

        string(1) "a"

        [7]=>

        string(4) "Test"

      }



  */



?>

Expected result:
----------------
Included in the Test Script

Actual result:
--------------
Warning: explode() expects parameter 1 to be string, array given in php
shell code 

on line 1

NULL

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52268&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52268&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52268&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52268&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52268&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52268&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52268&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52268&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52268&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52268&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52268&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52268&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52268&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52268&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52268&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52268&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52268&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52268&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52268&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52268&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52268&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52268&r=mysqlcfg

Reply via email to