رفتن به مطلب

جایگزین کد در PHP 7.4


tag1

پست های پیشنهاد شده

سلام

در هنگام اجرای یک اسکریپت این بخشش ارور میده:

//RETURNS BEFORE, AFTER, AND BETWEEN FOR STRINGS
function before($this, $inthat) {
 return substr($inthat, 0, strpos($inthat, $this));
}

function after($this, $inthat) {
 if(!is_bool(strpos($inthat, $this))) {
  return substr($inthat, strpos($inthat,$this)+strlen($this));
 } else {
  return false;
 }
}

function between($this, $that, $inthat) {
 return before($that, after($this, $inthat));
}//END before(), after(), and between() functions


// FIND NUMBER OF OCCURRENCES OF CONTAINERS IN TEMPLATE
function occurrencecount($this, $that, $inthat, $count) {
 $newinthat = after("$that", after("$this", $inthat));
 if($newinthat != false) {
 $count = $count + 1;
 return occurrencecount($this, $that, $newinthat, $count);
 } else {
 return $count;
 }
}//END occurrencecount() function

کدش به PHP 7.4 به چه صورت هست؟

لینک به دیدگاه
به اشتراک گذاری در سایت های دیگر

بایگانی شده

این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.

مهمان
این موضوع برای عدم ارسال قفل گردیده است.
×
×
  • اضافه کردن...