I
I
iromen7772017-08-14 11:57:52
JavaScript
iromen777, 2017-08-14 11:57:52

How to write the site.ru line in php 7 so that "//" are not perceived as comments?

How to write a line in php 7 http://site.ruso that "//" are not perceived as comments?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Askhat Bikmetov, 2019-04-04
@killwayne

Do not thank

const monthToInt = val => {
  val = val.toLowerCase();
  switch (true) {
    case !!val.match(/^янв/):  return 0;
    // TODO добавить больше кейсов
  }
}

const dateFromLocaleString = date =>
  new Date(
    ...date
      .split(" ")
      .reduce(
        (acc, val) =>
          (acc = [val.match(/\D/) ? monthToInt(val) : parseInt(val), ...acc]),
        []
      )
  )

dateFromLocaleString('07 янв 2019')

D
Dmitry Dart, 2017-08-14
@gobananas

Same as 5...

$var = '//site.ru';
$var = $protocol.'//'.$site_ru;

4
4iloveg, 2017-08-14
@4iloveg

You at all desire cannot force to perceive line contents as the comment.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question