This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$text = 'Text with two links [inline1](https://www.nrk.no) and [inline2](https://www.yr.no), may occur.'; | |
$regex = <<<'REGEX' | |
(?<text_group> # Text group, including square brackets | |
\[ | |
(?> # (?> defines an atomic group, this is a performance improvement when using recursion | |
[^\[\]]+ # Look for any char except closing square bracket | |
|(?&text_group) # OR: find recursively an other pattern with opening and closing square brackets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.2-fpm | |
RUN pecl install apcu \ | |
&& docker-php-ext-enable apcu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# docker build -t symfony_docs_generator . | |
# docker run --rm -v `pwd`:/var/www/symfony-docs symfony_docs_generator make html | |
FROM python:3.6 | |
MAINTAINER Michaël Perrin <[email protected]> | |
RUN pip install sphinx~=1.3.0 git+https://github.com/fabpot/sphinx-php.git | |
# Install LaTeX PDF for PDF build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @Entity **/ | |
class User | |
{ | |
// ... | |
} | |
/** @Entity **/ | |
class Order | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyObject | |
{ | |
protected static $instance; | |
protected function __construct() { } | |
/** | |
* Returns an instance of this class | |
* (this class uses the singleton pattern) |