These instructions are for profiling a PHP application running on a CentOS-6 remote host using the php56u
php 5.6 packages from an OSX local host.
Install Xdebug for php56u
.
# yum -y install \
git stash apply (stash-hash) // |
function reloadCSS() { | |
const links = document.getElementsByTagName('link'); | |
Array.from(links) | |
.filter(link => link.rel.toLowerCase() === 'stylesheet' && link.href) | |
.forEach(link => { | |
const url = new URL(link.href, location.href); | |
url.searchParams.set('forceReload', Date.now()); | |
link.href = url.href; | |
}); |
<?php | |
function my_customize_rest_cors() { | |
remove_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' ); | |
add_filter( 'rest_pre_serve_request', function( $value ) { | |
header( 'Access-Control-Allow-Origin: *' ); | |
header( 'Access-Control-Allow-Methods: GET' ); | |
header( 'Access-Control-Allow-Credentials: true' ); | |
header( 'Access-Control-Expose-Headers: Link', false ); |
<?php | |
/** | |
* Check if a given string is a valid UUID | |
* | |
* @param string $uuid The string to check | |
* @return boolean | |
*/ | |
function isValidUuid( $uuid ) { | |
if (!is_string($uuid) || (preg_match('/^[a-f\d]{8}(-[a-f\d]{4}){4}[a-f\d]{8}$/i', $uuid) !== 1)) { |
<html data-namespace-typo3-fluid="true" xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"> | |
<link rel="apple-touch-icon" sizes="57x57" href="{f:uri.resource(path:'Favicons/apple-touch-icon-57x57.png')}"> | |
<link rel="apple-touch-icon" sizes="60x60" href="{f:uri.resource(path:'Favicons/apple-touch-icon-60x60.png')}"> | |
<link rel="apple-touch-icon" sizes="72x72" href="{f:uri.resource(path:'Favicons/apple-touch-icon-72x72.png')}"> | |
<link rel="apple-touch-icon" sizes="76x76" href="{f:uri.resource(path:'Favicons/apple-touch-icon-76x76.png')}"> | |
<link rel="apple-touch-icon" sizes="114x114" href="{f:uri.resource(path:'Favicons/apple-touch-icon-114x114.png')}"> | |
<link rel="apple-touch-icon" sizes="120x120" href="{f:uri.resource(path:'Favicons/apple-touch-icon-120x120.png')}"> | |
<link rel="apple-touch-icon" sizes="144x144" href="{f:uri.resource(path:'Favicons/apple-touch-icon-144x144.png')}"> | |
<link rel="apple-touch-icon" sizes="152x152" href="{f:uri.resource(path:'Favicons/apple-touch-icon-152x152.png')}"> |
<?php | |
namespace DmitryDulepov\Myext\Controller; | |
class MyController { | |
/** | |
* @var \DmitryDulepov\Myext\\Domain\Repository\RecordRepository | |
* @inject | |
*/ | |
protected $recordRepository; |