3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function generateTestingCenterNumber() { $nation = strtoupper('de'); // created schon da? $zulassung = new DateTime('now'); $jahr = $zulassung->format('Y'); #$qmonat = $this->crossfoot($zulassung->format('n')); $tagdesjahres = $zulassung->format('z'); $qtimestamp = crossfoot($zulassung->format('U')); return $nation.'TC'.$jahr.$tagdesjahres.$qtimestamp.rand(1000, 9999); } function crossfoot( $digits ) { // Typcast falls Integer uebergeben $strDigits = ( string ) $digits; for( $intCrossfoot = $i = 0; $i < strlen ( $strDigits ); $i++ ) { $intCrossfoot += $strDigits{$i}; } return $intCrossfoot; } echo generateTestingCenterNumber();
based on QoIpb
Output for 7.2.0
DETC2015249309897
Output for 7.1.10
DETC2015249301239
Output for 7.1.7
DETC2015249301365
Output for 7.1.6
DETC2015249303453
Output for 7.1.5
DETC2015249303266
Output for 7.1.0
DETC2015249304559
Output for 7.0.20
DETC2015249307178
Output for 7.0.6
DETC2016123423525
Output for 7.0.5
DETC201692449027
Output for 7.0.4
DETC201669549669
Output for 7.0.3
DETC201677445097
Output for 7.0.2
DETC201681548633
Output for 7.0.1
DETC201682434779
Output for 7.0.0
DETC201685434058
Output for 5.6.28
DETC2015249309623
Output for 5.6.21
DETC2016122289136
Output for 5.6.20
DETC201699242255
Output for 5.6.19
DETC201666548839
Output for 5.6.18
DETC201673525700
Output for 5.6.17
DETC201678429705
Output for 5.6.16
DETC201686504936
Output for 5.6.15
DETC201687517737
Output for 5.6.14
DETC201692454037
Output for 5.6.13
DETC2016105547939
Output for 5.6.12
DETC2016109376598
Output for 5.6.11
DETC2016113415344
Output for 5.6.10
DETC2016115413676
Output for 5.6.9
DETC2016117452823
Output for 5.6.8
DETC2016119391589
Output for 5.6.7
DETC2016145403867
Output for 5.5.35
DETC2016142469583
Output for 5.5.34
DETC2016100343202
Output for 5.5.33
DETC201667423679
Output for 5.5.32
DETC201676432895
Output for 5.5.31
DETC201679446038
Output for 5.5.30
DETC201691519541
Output for 5.5.29
DETC2016106485601
Output for 5.5.28
DETC2016110385696
Output for 5.5.27
DETC2016112448063
Output for 5.5.26
DETC2016116368434
Output for 5.5.25
DETC2016118508805
Output for 5.5.24
DETC2016143326280
Output for 5.4.45
DETC2015249364412
Output for 5.4.44
DETC2015249362470
Output for 5.4.43
DETC2015249367320
Output for 5.4.42
DETC2015249364007
Output for 5.4.41
DETC2015249363825
Output for 5.4.40
DETC2015249283077
Output for 5.4.39
DETC2015249283175
Output for 5.4.38
DETC2015249286604
Output for 5.4.37
DETC2015249286553
Output for 5.4.36
DETC2015249295223
Output for 5.4.35
DETC2015249294226
Output for 5.4.34
DETC2015249297342
Output for 5.4.32
DETC2015249298662
Output for 5.4.31
DETC2015249291527
Output for 5.4.30
DETC2015249305273
Output for 5.4.29
DETC2015249302470
Output for 5.4.28
DETC2015249309038
Output for 5.4.27
DETC2015249302499
Output for 5.4.26
DETC2015249303212
Output for 5.4.25
DETC2015249313936
Output for 5.4.24
DETC2015249315339
Output for 5.4.23
DETC2015249313363
Output for 5.4.22
DETC2015249312671
Output for 5.4.21
DETC2015249321994
Output for 5.4.20
DETC2015249324808
Output for 5.4.19
DETC2015249328016
Output for 5.4.18
DETC2015249321947
Output for 5.4.17
DETC2015249325524
Output for 5.4.16
DETC2015249338659
Output for 5.4.15
DETC2015249331807
Output for 5.4.14
DETC2015249333068
Output for 5.4.13
DETC2015249331063
Output for 5.4.12
DETC2015249335844
Output for 5.4.11
DETC2015249347727
Output for 5.4.10
DETC2015249347869
Output for 5.4.9
DETC2015249347335
Output for 5.4.8
DETC2015249342389
Output for 5.4.7
DETC2015249347119
Output for 5.4.6
DETC2015299476718
Output for 5.4.5
DETC2015299399243
Output for 5.4.4
DETC2015299395104
Output for 5.4.3
DETC2015299517118
Output for 5.4.2
DETC2015299465465
Output for 5.3.29
DETC2015262455354
Output for 5.3.28
DETC2015262441047
Output for 5.3.27
DETC2015262441172
Output for 5.3.26
DETC2015262432247
Output for 5.3.25
DETC2015262432335
Output for 5.3.24
DETC2015262516364
Output for 5.3.23
DETC2015262518753
Output for 5.3.22
DETC2015262509665
Output for 5.3.21
DETC2015262508587
Output for 5.3.20
DETC2015262499709
Output for 5.3.19
DETC2015262497651
Output for 5.3.18
DETC2015262484020
Output for 5.3.17
DETC2015262485523