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; } function splor_numbers_get_past( $dob ) { $dateTotals = splor_numbers_get_dob_totals( $dob ); return splor_numbers_get_numerology_totals( $dateTotals[0] ); } function splor_numbers_get_gift( $dob ) { $dateTotals = splor_numbers_get_dob_totals( $dob ); return splor_numbers_get_numerology_totals( $dateTotals[3] ); } function splor_numbers_get_purpose( $dob ) { $dateTotals = splor_numbers_get_dob_totals( $dob ); return splor_numbers_get_numerology_totals( $dateTotals[0] + $dateTotals[1] + $dateTotals[2] + $dateTotals[3] ); } $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"; echo "Past: " . splor_numbers_get_past( $dob ) . "\n"; echo "Gift: " . splor_numbers_get_gift( $dob ) . "\n"; echo "Purpose: " . splor_numbers_get_purpose( $dob ) . "\n";
based on MNq1S
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
YYYY: 5 MM: 8 DD: 3 YY: 4 Governing: 7 Awareness: 3 Past: 5 Gift: 4 Purpose: 2
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: str_split() in /in/bZHOR 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/bZHOR 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/bZHOR on line 26