11<?php
22
3+ // phpcs:disable PSR1.Files.SideEffects
4+
35// PostHog PHP library example
46//
57// This script demonstrates various PostHog PHP SDK capabilities including:
@@ -267,7 +269,11 @@ function flagDependencyExamples()
267269 [],
268270 true
269271 );
270- echo "📊 Beta feature comparison - @example.com: " . json_encode ($ beta1 ) . ", regular: " . json_encode ($ beta2 ) . "\n" ;
272+ echo "📊 Beta feature comparison - @example.com: "
273+ . json_encode ($ beta1 )
274+ . ", regular: "
275+ . json_encode ($ beta2 )
276+ . "\n" ;
271277
272278 echo "\n🎯 Results Summary: \n" ;
273279 echo " - Flag dependencies evaluated locally: " . ($ result1 != $ result2 ? "✅ YES " : "❌ NO " ) . "\n" ;
@@ -302,7 +308,10 @@ function flagDependencyExamples()
302308 true
303309 );
304310 if ($ dependentResult3 !== "breaking-bad " ) {
305- echo " ❌ Something went wrong evaluating 'multivariate-root-flag' with pineapple@example.com. Expected 'breaking-bad', got ' " . json_encode ($ dependentResult3 ) . "' \n" ;
311+ echo " ❌ Something went wrong evaluating 'multivariate-root-flag' with pineapple@example.com. "
312+ . "Expected 'breaking-bad', got ' "
313+ . json_encode ($ dependentResult3 )
314+ . "' \n" ;
306315 } else {
307316 echo "✅ 'multivariate-root-flag' with email pineapple@example.com succeeded \n" ;
308317 }
@@ -317,7 +326,10 @@ function flagDependencyExamples()
317326 true
318327 );
319328 if ($ dependentResult4 !== "the-wire " ) {
320- echo " ❌ Something went wrong evaluating multivariate-root-flag with mango@example.com. Expected 'the-wire', got ' " . json_encode ($ dependentResult4 ) . "' \n" ;
329+ echo " ❌ Something went wrong evaluating multivariate-root-flag with mango@example.com. "
330+ . "Expected 'the-wire', got ' "
331+ . json_encode ($ dependentResult4 )
332+ . "' \n" ;
321333 } else {
322334 echo "✅ 'multivariate-root-flag' with email mango@example.com succeeded \n" ;
323335 }
@@ -491,7 +503,9 @@ function etagPollingExamples()
491503 if ($ beforeEtag === $ afterEtag && $ beforeEtag !== null ) {
492504 echo "No change (304 Not Modified) - $ currentFlagCount flag(s) \n" ;
493505 } else {
494- echo "🔄 Flags updated! New ETag: " . ($ afterEtag ? substr ($ afterEtag , 0 , 20 ) . "... " : "none " ) . " - $ currentFlagCount flag(s) \n" ;
506+ echo "🔄 Flags updated! New ETag: "
507+ . ($ afterEtag ? substr ($ afterEtag , 0 , 20 ) . "... " : "none " )
508+ . " - $ currentFlagCount flag(s) \n" ;
495509 }
496510
497511 $ iteration ++;
0 commit comments