3v4l.org

run code in 300+ PHP versions simultaneously
<?php $new = json_decode('{ "id": 100, "owner": { "id": 719, "name": "test", "logo": null, "naf": "3202A", "siren": "123465687", "phone": "000000000", "speEntity": { "strKey": "01", "label": "Entreprise priv\u00e9e" }, "industry": { "strKey": "01.agri _sylvi_ peche", "label": "Agriculture - Sylviculture - P\u00eache" }, "speIndustry": { "strKey": "01.agri _sylvi_ peche.agri _sylvi_ peche", "label": "Agriculture - Sylviculture - P\u00eache" }, "owner": null, "workspace": {}, "siege": {} }, "workspace": {}, "dateCreate": null, "dateModify": "2018-10-30T16:27:02+0100", "serialNumber": "tgnpettinoto", "gender": { "strKey": "01", "label": "Monsieur" }, "firstName": "Tristan", "lastName": "Pettinotti", "birthName": "Pettinotti", "birthDate": "2990-03-12T00:00:00+0100", "birthCity": "Trois", "birthDepartment": { "strKey": "25", "label": "Doubs" }, "birthCountry": { "strKey": "FO", "label": "F\u00c9RO\u00c9ILES" }, "codificationEU": { "strKey": "03", "label": "EEE" }, "nationality": { "strKey": "AD", "label": "ANDORRE" }, "primaryLanguage": { "strKey": "fo", "label": "F\u00e9ro\u00efen" }, "secondLanguage": { "strKey": "eo", "label": "Esp\u00e9ranto" }, "thirdLanguage": { "strKey": "kw", "label": "Cornique" }, "status": null, "identityDocs": [{ "id": "2f8cc29a-6901-4f87-8afc-7c1f031ebd5f", "name": "Note de frais_TRISTAN - OCTOBRE.pdf" }, { "id": "a303bd5c-046d-48d3-909f-90ba02cf3595", "name": "Note de frais_TRISTAN - OCTOBRE.pdf" }, { "id": "b802bb29-a22b-41fd-bfc2-762b756cab73", "name": "Note de frais_TRISTAN - OCTOBRE.pdf" }, { "id": "bbeeb24b-3d45-43cb-b704-f429b376c152", "name": "Note de frais_TRISTAN - OCTOBRE.pdf" }, { "id": "c65e0808-c68d-4f98-b26b-f051ce0da117", "name": "remy.png" }, { "id": "dd67c6e9-496e-4e3e-a4f7-a3b363df3c98", "name": "trollface.png" }], "ssNumber": "123456789123000", "ssDocs": [], "residStatus": { "strKey": "01", "label": "Oui" }, "residDocs": [{ "id": "94afd016-36c6-4f0b-91ed-8a702b9e7e12", "name": "Note de frais_TRISTAN - OCTOBRE.pdf" }], "driverLicences": ["a", "ed"], "driverLicDocs": [], "disabledWorker": false, "disabledWorkDocs": [], "adaptedWorker": false, "adaptedWorkDocs": [{ "id": "3a1f0ac7-e99b-46b2-9e01-c2a36d67c8c7", "name": "trollface.png" }, { "id": "d2c08512-33a8-4184-86a6-7648ef23ad8d", "name": "6211-1532336916.jpg" }, { "id": "f44aacf7-d3ce-4e52-ba79-7a32ad768e66", "name": "mergeme.jpg" }], "civilianStatus": { "strKey": "viem", "label": "Vie maritale" }, "childCount": 305, "chargedPersons": 0, "personalAddress": "u10 Route des Maisons", "personalAdditionalAddress": "1\u00e9me \u00e9tage", "postalCode": "10250", "personalCity": "Paris", "personalCountry": { "strKey": "FO", "label": "F\u00c9RO\u00c9ILES" }, "addressProofDocs": [{ "id": "e0f13e67-94b7-497b-beca-f42f15a28e77", "name": "CSE.01.6.020_HdvimW.docx" }], "proShortPhone": "328", "proMobile": "0600000012", "proPhone": "1600000011", "proEmail": "tristan9@zol.it", "personalEmail": "tristan8@pro.fr", "personalPhone": "0600000013", "emergencyFirstName": "", "emergencyLastName": "Tata", "emergencyPhone": "065589870", "contract": {}, "alerts": [] }'); $old = json_decode("{ id: '100', gender: { strKey: '02', label: 'Madame' }, firstName: 'Test', lastName: 'Test Name', birthName: 'Name', nationality: { strKey: 'FR', label: 'FRANCE' }, birthCity: 'Lyon', birthDate: '1950-03-10T00:00:00+01:00', birthDepartment: { strKey: '38', label: 'Isère' }, birthCountry: { strKey: 'FR', label: 'FRANCE' }, category: null, codificationEU: { strKey: '02', label: 'UE' }, primaryLanguage: { strKey: 'fr', label: 'Français' }, secondLanguage: { strKey: 'en', label: 'Anglais' }, thirdLanguage: { strKey: 'it', label: 'Italien' }, residStatus: { strKey: '01', label: 'Oui' }, disabledWorker: null, adaptedWorker: true, driverLicences: [ 'b', 'a' ], ssNumber: '1234567891234', civilianStatus: { strKey: 'viem', label: 'Vie maritale' }, serialNumber: 'TEST-4224-TE', childCount: '2', chargedPersons: null, personalAddress: '1 Route du Chemin', personalAdditionalAddress: '2éme étage', postalCode: '38000', personalCity: 'Grenoble', personalCountry: { strKey: 'FR', label: 'FRANCE' }, proShortPhone: '32', proMobile: '0600000010', proPhone: '0600000010', proEmail: 'test@test.fr', personalEmail: 'test@pro.fr', personalPhone: '0600000010', emergencyFirstName: 'Foo', emergencyLastName: 'Bar', emergencyPhone: '0600000020' }"); var_dump($new, $old);
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.33, 7.4.4 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
object(stdClass)#1 (51) { ["id"]=> int(100) ["owner"]=> object(stdClass)#2 (12) { ["id"]=> int(719) ["name"]=> string(4) "test" ["logo"]=> NULL ["naf"]=> string(5) "3202A" ["siren"]=> string(9) "123465687" ["phone"]=> string(9) "000000000" ["speEntity"]=> object(stdClass)#3 (2) { ["strKey"]=> string(2) "01" ["label"]=> string(18) "Entreprise privée" } ["industry"]=> object(stdClass)#4 (2) { ["strKey"]=> string(21) "01.agri _sylvi_ peche" ["label"]=> string(35) "Agriculture - Sylviculture - Pêche" } ["speIndustry"]=> object(stdClass)#5 (2) { ["strKey"]=> string(40) "01.agri _sylvi_ peche.agri _sylvi_ peche" ["label"]=> string(35) "Agriculture - Sylviculture - Pêche" } ["owner"]=> NULL ["workspace"]=> object(stdClass)#6 (0) { } ["siege"]=> object(stdClass)#7 (0) { } } ["workspace"]=> object(stdClass)#8 (0) { } ["dateCreate"]=> NULL ["dateModify"]=> string(24) "2018-10-30T16:27:02+0100" ["serialNumber"]=> string(12) "tgnpettinoto" ["gender"]=> object(stdClass)#9 (2) { ["strKey"]=> string(2) "01" ["label"]=> string(8) "Monsieur" } ["firstName"]=> string(7) "Tristan" ["lastName"]=> string(10) "Pettinotti" ["birthName"]=> string(10) "Pettinotti" ["birthDate"]=> string(24) "2990-03-12T00:00:00+0100" ["birthCity"]=> string(5) "Trois" ["birthDepartment"]=> object(stdClass)#10 (2) { ["strKey"]=> string(2) "25" ["label"]=> string(5) "Doubs" } ["birthCountry"]=> object(stdClass)#11 (2) { ["strKey"]=> string(2) "FO" ["label"]=> string(11) "FÉROÉILES" } ["codificationEU"]=> object(stdClass)#12 (2) { ["strKey"]=> string(2) "03" ["label"]=> string(3) "EEE" } ["nationality"]=> object(stdClass)#13 (2) { ["strKey"]=> string(2) "AD" ["label"]=> string(7) "ANDORRE" } ["primaryLanguage"]=> object(stdClass)#14 (2) { ["strKey"]=> string(2) "fo" ["label"]=> string(9) "Féroïen" } ["secondLanguage"]=> object(stdClass)#15 (2) { ["strKey"]=> string(2) "eo" ["label"]=> string(10) "Espéranto" } ["thirdLanguage"]=> object(stdClass)#16 (2) { ["strKey"]=> string(2) "kw" ["label"]=> string(8) "Cornique" } ["status"]=> NULL ["identityDocs"]=> array(6) { [0]=> object(stdClass)#17 (2) { ["id"]=> string(36) "2f8cc29a-6901-4f87-8afc-7c1f031ebd5f" ["name"]=> string(35) "Note de frais_TRISTAN - OCTOBRE.pdf" } [1]=> object(stdClass)#18 (2) { ["id"]=> string(36) "a303bd5c-046d-48d3-909f-90ba02cf3595" ["name"]=> string(35) "Note de frais_TRISTAN - OCTOBRE.pdf" } [2]=> object(stdClass)#19 (2) { ["id"]=> string(36) "b802bb29-a22b-41fd-bfc2-762b756cab73" ["name"]=> string(35) "Note de frais_TRISTAN - OCTOBRE.pdf" } [3]=> object(stdClass)#20 (2) { ["id"]=> string(36) "bbeeb24b-3d45-43cb-b704-f429b376c152" ["name"]=> string(35) "Note de frais_TRISTAN - OCTOBRE.pdf" } [4]=> object(stdClass)#21 (2) { ["id"]=> string(36) "c65e0808-c68d-4f98-b26b-f051ce0da117" ["name"]=> string(8) "remy.png" } [5]=> object(stdClass)#22 (2) { ["id"]=> string(36) "dd67c6e9-496e-4e3e-a4f7-a3b363df3c98" ["name"]=> string(13) "trollface.png" } } ["ssNumber"]=> string(15) "123456789123000" ["ssDocs"]=> array(0) { } ["residStatus"]=> object(stdClass)#23 (2) { ["strKey"]=> string(2) "01" ["label"]=> string(3) "Oui" } ["residDocs"]=> array(1) { [0]=> object(stdClass)#24 (2) { ["id"]=> string(36) "94afd016-36c6-4f0b-91ed-8a702b9e7e12" ["name"]=> string(35) "Note de frais_TRISTAN - OCTOBRE.pdf" } } ["driverLicences"]=> array(2) { [0]=> string(1) "a" [1]=> string(2) "ed" } ["driverLicDocs"]=> array(0) { } ["disabledWorker"]=> bool(false) ["disabledWorkDocs"]=> array(0) { } ["adaptedWorker"]=> bool(false) ["adaptedWorkDocs"]=> array(3) { [0]=> object(stdClass)#25 (2) { ["id"]=> string(36) "3a1f0ac7-e99b-46b2-9e01-c2a36d67c8c7" ["name"]=> string(13) "trollface.png" } [1]=> object(stdClass)#26 (2) { ["id"]=> string(36) "d2c08512-33a8-4184-86a6-7648ef23ad8d" ["name"]=> string(19) "6211-1532336916.jpg" } [2]=> object(stdClass)#27 (2) { ["id"]=> string(36) "f44aacf7-d3ce-4e52-ba79-7a32ad768e66" ["name"]=> string(11) "mergeme.jpg" } } ["civilianStatus"]=> object(stdClass)#28 (2) { ["strKey"]=> string(4) "viem" ["label"]=> string(12) "Vie maritale" } ["childCount"]=> int(305) ["chargedPersons"]=> int(0) ["personalAddress"]=> string(21) "u10 Route des Maisons" ["personalAdditionalAddress"]=> string(12) "1éme étage" ["postalCode"]=> string(5) "10250" ["personalCity"]=> string(5) "Paris" ["personalCountry"]=> object(stdClass)#29 (2) { ["strKey"]=> string(2) "FO" ["label"]=> string(11) "FÉROÉILES" } ["addressProofDocs"]=> array(1) { [0]=> object(stdClass)#30 (2) { ["id"]=> string(36) "e0f13e67-94b7-497b-beca-f42f15a28e77" ["name"]=> string(24) "CSE.01.6.020_HdvimW.docx" } } ["proShortPhone"]=> string(3) "328" ["proMobile"]=> string(10) "0600000012" ["proPhone"]=> string(10) "1600000011" ["proEmail"]=> string(15) "tristan9@zol.it" ["personalEmail"]=> string(15) "tristan8@pro.fr" ["personalPhone"]=> string(10) "0600000013" ["emergencyFirstName"]=> string(0) "" ["emergencyLastName"]=> string(4) "Tata" ["emergencyPhone"]=> string(9) "065589870" ["contract"]=> object(stdClass)#31 (0) { } ["alerts"]=> array(0) { } } NULL

preferences:
149.14 ms | 414 KiB | 131 Q