3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = 'hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl OR hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl OR hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl OR kdjkdjkdjkj OR djdldkkldkkkldklddklkldkl OR jdkdkjdjkjkdjkdjkdjkjkjkjkdkjkdjkjkdjkjk OR hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl OR llldlkdl dkld ldk'; print_r(preg_split('~(?<!20k)\bOR\b~', $str));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl [1] => hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl [2] => hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl [3] => kdjkdjkdjkj [4] => djdldkkldkkkldklddklkldkl [5] => jdkdkjdjkjkdjkdjkdjkjkjkjkdkjkdjkjkdjkjk [6] => hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl hdjhjdhjdhdhjdhjhdldkklkdklkllkldkldldkl kldkldkl [7] => llldlkdl dkld ldk )