3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Attempt to reproduce "element" issue $elements = array( "eng%C3%A5%C2%BF%C2", "Products" );// url, exploded by "/" $saList = array( "eng", "fre" ); $URIMatchElement = 1;// URIMatchElement setting $elements = array_slice( $elements, 0, $URIMatchElement ); $name = implode( '_', $elements ); $name = preg_replace( array( '/[^a-zA-Z0-9]+/', '/_+/', '/^_/', '/_$/' ), array( '_', '_', '', '' ), $name ); echo $name; echo in_array( $name, $saList ) ? 1 : 0;// if issue is true, then this should be true
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.1.0
eng_C3_A5_C2_BF_C20
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/id3WL on line 16
Process exited with code 255.