fork download
  1. <?php
  2. $body = '{
  3. "details": "detail",
  4. "version": 4,
  5. "items": {
  6. "ES": [
  7. {
  8. "effective_from": "0000-01-01",
  9. "rates": {
  10. "super_reduced": 4,
  11. "reduced": 10,
  12. "standard": 21
  13. },
  14. "exceptions": [
  15. {
  16. "name": "Canary Islands",
  17. "postcode": "(35\\d{3}|38\\d{3})",
  18. "standard": 0
  19. },
  20. {
  21. "name": "Ceuta",
  22. "postcode": "(5100[1-5]|5107[0-1]|51081)",
  23. "standard": 0
  24. },
  25. {
  26. "name": "Melilla",
  27. "postcode": "(5200[0-6]|5207[0-1]|52081)",
  28. "standard": 0
  29. }
  30. ]
  31. }
  32. ],
  33. "BG": [
  34. {
  35. "effective_from": "0000-01-01",
  36. "rates": {
  37. "reduced": 9,
  38. "standard": 20
  39. }
  40. }
  41. ],
  42. "HU": [
  43. {
  44. "effective_from": "0000-01-01",
  45. "rates": {
  46. "reduced1": 5,
  47. "reduced2": 18,
  48. "standard": 27
  49. }
  50. }
  51. ],
  52. "LV": [
  53. {
  54. "effective_from": "0000-01-01",
  55. "rates": {
  56. "reduced1": 5,
  57. "reduced2": 12,
  58. "standard": 21
  59. }
  60. }
  61. ],
  62. "PL": [
  63. {
  64. "effective_from": "0000-01-01",
  65. "rates": {
  66. "reduced1": 5,
  67. "reduced2": 8,
  68. "standard": 23
  69. }
  70. }
  71. ],
  72. "GB": [
  73. {
  74. "effective_from": "2011-01-04",
  75. "rates": {
  76. "standard": 20,
  77. "reduced": 5
  78. }
  79. }
  80. ],
  81. "CZ": [
  82. {
  83. "effective_from": "2024-01-01",
  84. "rates": {
  85. "reduced": 12,
  86. "standard": 21
  87. }
  88. },
  89. {
  90. "effective_from": "0000-01-01",
  91. "rates": {
  92. "reduced1": 10,
  93. "reduced2": 15,
  94. "standard": 21
  95. }
  96. }
  97. ],
  98. "MT": [
  99. {
  100. "effective_from": "0000-01-01",
  101. "rates": {
  102. "reduced1": 5,
  103. "reduced2": 7,
  104. "standard": 18
  105. }
  106. }
  107. ],
  108. "IT": [
  109. {
  110. "effective_from": "0000-01-01",
  111. "rates": {
  112. "super_reduced": 4,
  113. "reduced1": 5,
  114. "reduced2": 10,
  115. "standard": 22
  116. },
  117. "exceptions": [
  118. {
  119. "name": "Campione dItalia",
  120. "postcode": "22061",
  121. "standard": 0
  122. },
  123. {
  124. "name": "Livigno",
  125. "postcode": "23041",
  126. "standard": 0
  127. }
  128. ]
  129. }
  130. ],
  131. "SI": [
  132. {
  133. "effective_from": "0000-01-01",
  134. "rates": {
  135. "reduced1": 5,
  136. "reduced2": 9.5,
  137. "standard": 22
  138. }
  139. }
  140. ],
  141. "IE": [
  142. {
  143. "effective_from": "2021-03-01",
  144. "rates": {
  145. "super_reduced": 4.8,
  146. "reduced1": 9,
  147. "reduced2": 13.5,
  148. "standard": 23,
  149. "parking": 13.5
  150. }
  151. },
  152. {
  153. "effective_from": "2020-09-01",
  154. "rates": {
  155. "super_reduced": 4.8,
  156. "reduced1": 9,
  157. "reduced2": 13.5,
  158. "standard": 21,
  159. "parking": 13.5
  160. }
  161. },
  162. {
  163. "effective_from": "0000-01-01",
  164. "rates": {
  165. "super_reduced": 4.8,
  166. "reduced1": 9,
  167. "reduced2": 13.5,
  168. "standard": 23,
  169. "parking": 13.5
  170. }
  171. }
  172. ],
  173. "SE": [
  174. {
  175. "effective_from": "0000-01-01",
  176. "rates": {
  177. "reduced1": 6,
  178. "reduced2": 12,
  179. "standard": 25
  180. }
  181. }
  182. ],
  183. "DK": [
  184. {
  185. "effective_from": "0000-01-01",
  186. "rates": {
  187. "standard": 25
  188. }
  189. }
  190. ],
  191. "FI": [
  192. {
  193. "effective_from": "2024-09-01",
  194. "rates": {
  195. "reduced1": 10,
  196. "reduced2": 14,
  197. "standard": 25.5
  198. }
  199. },
  200. {
  201. "effective_from": "0000-01-01",
  202. "rates": {
  203. "reduced1": 10,
  204. "reduced2": 14,
  205. "standard": 24
  206. }
  207. }
  208. ],
  209. "CY": [
  210. {
  211. "effective_from": "0000-01-01",
  212. "rates": {
  213. "reduced1": 5,
  214. "reduced2": 9,
  215. "standard": 19
  216. }
  217. }
  218. ],
  219. "LU": [
  220. {
  221. "effective_from": "2024-01-01",
  222. "rates": {
  223. "super_reduced": 3,
  224. "reduced1": 8,
  225. "standard": 17,
  226. "parking": 14
  227. }
  228. },
  229. {
  230. "effective_from": "2023-01-01",
  231. "rates": {
  232. "super_reduced": 3,
  233. "reduced1": 7,
  234. "standard": 16,
  235. "parking": 13
  236. }
  237. },
  238. {
  239. "effective_from": "2016-01-01",
  240. "rates": {
  241. "super_reduced": 3,
  242. "reduced1": 8,
  243. "standard": 17,
  244. "parking": 13
  245. }
  246. },
  247. {
  248. "effective_from": "2015-01-01",
  249. "rates": {
  250. "super_reduced": 3,
  251. "reduced1": 8,
  252. "reduced2": 14,
  253. "standard": 17,
  254. "parking": 12
  255. }
  256. },
  257. {
  258. "effective_from": "0000-01-01",
  259. "rates": {
  260. "super_reduced": 3,
  261. "reduced1": 6,
  262. "reduced2": 12,
  263. "standard": 15,
  264. "parking": 12
  265. }
  266. }
  267. ],
  268. "RO": [
  269. {
  270. "effective_from": "2017-01-01",
  271. "rates": {
  272. "reduced1": 5,
  273. "reduced2": 9,
  274. "standard": 19
  275. }
  276. },
  277. {
  278. "effective_from": "2016-01-01",
  279. "rates": {
  280. "reduced1": 5,
  281. "reduced2": 9,
  282. "standard": 20
  283. }
  284. },
  285. {
  286. "effective_from": "0000-01-01",
  287. "rates": {
  288. "reduced1": 5,
  289. "reduced2": 9,
  290. "standard": 24
  291. }
  292. }
  293. ],
  294. "EE": [
  295. {
  296. "effective_from": "2025-01-01",
  297. "rates": {
  298. "reduced": 13,
  299. "standard": 22
  300. }
  301. },
  302. {
  303. "effective_from": "2024-01-01",
  304. "rates": {
  305. "reduced": 9,
  306. "standard": 22
  307. }
  308. },
  309. {
  310. "effective_from": "0000-01-01",
  311. "rates": {
  312. "reduced": 9,
  313. "standard": 20
  314. }
  315. }
  316. ],
  317. "GR": [
  318. {
  319. "effective_from": "2016-06-01",
  320. "rates": {
  321. "reduced1": 6,
  322. "reduced2": 13,
  323. "standard": 24
  324. },
  325. "exceptions": [
  326. {
  327. "name": "Mount Athos",
  328. "postcode": "63086",
  329. "standard": 0
  330. }
  331. ]
  332. },
  333. {
  334. "effective_from": "2016-01-01",
  335. "rates": {
  336. "reduced1": 6,
  337. "reduced2": 13.5,
  338. "standard": 23
  339. }
  340. },
  341. {
  342. "effective_from": "0000-01-01",
  343. "rates": {
  344. "reduced1": 6.5,
  345. "reduced2": 13,
  346. "standard": 23
  347. }
  348. }
  349. ],
  350. "LT": [
  351. {
  352. "effective_from": "0000-01-01",
  353. "rates": {
  354. "reduced1": 5,
  355. "reduced2": 9,
  356. "standard": 21
  357. }
  358. }
  359. ],
  360. "FR": [
  361. {
  362. "effective_from": "2014-01-01",
  363. "rates": {
  364. "super_reduced": 2.1,
  365. "reduced1": 5.5,
  366. "reduced2": 10,
  367. "standard": 20
  368. },
  369. "exceptions": [
  370. {
  371. "name": "Guadeloupe",
  372. "postcode": "971\\d{2,}",
  373. "standard": 8.5
  374. },
  375. {
  376. "name": "Martinique",
  377. "postcode": "972\\d{2,}",
  378. "standard": 8.5
  379. },
  380. {
  381. "name": "Guyane",
  382. "postcode": "973\\d{2,}",
  383. "standard": 0
  384. },
  385. {
  386. "name": "Reunion",
  387. "postcode": "974\\d{2,}",
  388. "standard": 8.5
  389. },
  390. {
  391. "name": "Mayotte",
  392. "postcode": "976\\d{2,}",
  393. "standard": 0
  394. }
  395. ]
  396. },
  397. {
  398. "effective_from": "2012-01-01",
  399. "rates": {
  400. "super_reduced": 2.1,
  401. "reduced1": 5.5,
  402. "reduced2": 7,
  403. "standard": 19.6
  404. }
  405. },
  406. {
  407. "effective_from": "0000-01-01",
  408. "rates": {
  409. "super_reduced": 2.1,
  410. "reduced1": 5.5,
  411. "standard": 19.6
  412. }
  413. }
  414. ],
  415. "HR": [
  416. {
  417. "effective_from": "0000-01-01",
  418. "rates": {
  419. "reduced1": 5,
  420. "reduced2": 13,
  421. "standard": 25
  422. }
  423. }
  424. ],
  425. "BE": [
  426. {
  427. "effective_from": "0000-01-01",
  428. "rates": {
  429. "reduced1": 6,
  430. "reduced2": 12,
  431. "standard": 21,
  432. "parking": 12
  433. }
  434. }
  435. ],
  436. "NL": [
  437. {
  438. "effective_from": "2019-01-01",
  439. "rates": {
  440. "reduced": 9,
  441. "standard": 21
  442. }
  443. },
  444. {
  445. "effective_from": "2012-10-01",
  446. "rates": {
  447. "reduced": 6,
  448. "standard": 21
  449. }
  450. },
  451. {
  452. "effective_from": "0000-01-01",
  453. "rates": {
  454. "reduced": 6,
  455. "standard": 19
  456. }
  457. }
  458. ],
  459. "SK": [
  460. {
  461. "effective_from": "0000-01-01",
  462. "rates": {
  463. "reduced": 10,
  464. "standard": 20
  465. }
  466. }
  467. ],
  468. "DE": [
  469. {
  470. "effective_from": "2021-01-01",
  471. "rates": {
  472. "reduced": 7,
  473. "standard": 19
  474. },
  475. "exceptions": [
  476. {
  477. "name": "Büsingen am Hochrhein",
  478. "postcode": "78266",
  479. "standard": 0
  480. },
  481. {
  482. "name": "Heligoland",
  483. "postcode": "27498",
  484. "standard": 0
  485. }
  486. ]
  487. },
  488. {
  489. "effective_from": "2020-07-01",
  490. "rates": {
  491. "reduced": 5,
  492. "standard": 16
  493. },
  494. "exceptions": [
  495. {
  496. "name": "Büsingen am Hochrhein",
  497. "postcode": "78266",
  498. "standard": 0
  499. },
  500. {
  501. "name": "Heligoland",
  502. "postcode": "27498",
  503. "standard": 0
  504. }
  505. ]
  506. },
  507. {
  508. "effective_from": "0000-01-01",
  509. "rates": {
  510. "reduced": 7,
  511. "standard": 19
  512. },
  513. "exceptions": [
  514. {
  515. "name": "Büsingen am Hochrhein",
  516. "postcode": "78266",
  517. "standard": 0
  518. },
  519. {
  520. "name": "Heligoland",
  521. "postcode": "27498",
  522. "standard": 0
  523. }
  524. ]
  525. }
  526. ],
  527. "PT": [
  528. {
  529. "effective_from": "0000-01-01",
  530. "rates": {
  531. "reduced1": 6,
  532. "reduced2": 13,
  533. "standard": 23,
  534. "parking": 13
  535. },
  536. "exceptions": [
  537. {
  538. "name": "Madeira",
  539. "postcode": "9[0-4]\\d{2,}",
  540. "standard": 22
  541. },
  542. {
  543. "name": "Azores",
  544. "postcode": "9[5-9]\\d{2,}",
  545. "standard": 18
  546. }
  547. ]
  548. }
  549. ],
  550. "AT": [
  551. {
  552. "effective_from": "2016-01-01",
  553. "rates": {
  554. "reduced1": 10,
  555. "reduced2": 13,
  556. "standard": 20,
  557. "parking": 13
  558. },
  559. "exceptions": [
  560. {
  561. "name": "Jungholz",
  562. "postcode": "6691",
  563. "standard": 19
  564. },
  565. {
  566. "name": "Mittelberg",
  567. "postcode": "699[123]",
  568. "standard": 19
  569. }
  570. ]
  571. },
  572. {
  573. "effective_from": "0000-01-01",
  574. "rates": {
  575. "reduced": 10,
  576. "standard": 20,
  577. "parking": 12
  578. }
  579. }
  580. ]
  581. }
  582. }';
  583.  
  584. var_dump(json_decode($body, true));
  585. ?>
  586.  
Success #stdin #stdout 0.03s 25736KB
stdin
Standard input is empty
stdout
NULL