php 5.3 & 5.6

  • In PHP 5.3

imagejpeg($image, '', 100);

  • In PHP 5.4

imagejpeg($image, NULL, 100);


  • In PHP 5.3

    1
    $current_gallery = array_pop(preg_split("/[\/]/", dirname($img)));
  • In PHP 5.4

    1
    2
    $some_path_array = preg_split("/[\/]/", dirname($img));
    $current_gallery = array_pop($some_path_array);