3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function splor_numbers_get_governing( $dob ) { $dateTotals = splor_numbers_get_dob_totals( $dob ); return splor_numbers_get_numerology_totals( $dateTotals[0] + $dateTotals[1] + $dateTotals[2] ); } function splor_numbers_get_awareness( $dob ) { $dateTotals = splor_numbers_get_dob_totals( $dob ); return $dateTotals[2]; } function splor_numbers_get_dob_totals( $dob ) { $dataParts = explode( "-", $dob ); $yTotal = splor_numbers_get_numerology_totals( $dataParts[0] ); $mTotal = splor_numbers_get_numerology_totals( $dataParts[1] ); $dTotal = splor_numbers_get_numerology_totals( $dataParts[2] ); $yearparts = str_split( $dataParts[0] ); $lastTwo = splor_numbers_get_numerology_totals( $yearparts[2] + $yearparts[3] ); return array( $yTotal, $mTotal, $dTotal, $lastTwo ); } function splor_numbers_get_numerology_totals( $number ) { $total = array_sum( str_split( $number ) ); while ( $total > 9 ) { $total = array_sum( str_split( $total ) ); } return $total; } $dob = "2894-44-48"; $parts = splor_numbers_get_dob_totals( $dob ); echo "YYYY: " . $parts[0] . " MM: " . $parts[1] . " DD: " . $parts[2]. " YY: " . $parts[3] . "\n"; echo "Governing: " . splor_numbers_get_governing( $dob ) . "\n"; echo "Awareness: " . splor_numbers_get_awareness( $dob ) . "\n";
based on UOr4j
Output for 5.0.0 - 7.1.0
YYYY: 5 MM: 8 DD: 3 YY: 4 Governing: 7 Awareness: 3
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: str_split() in /in/MNq1S on line 26
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: str_split() in /in/MNq1S on line 26
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: str_split() in /in/MNq1S on line 26